decord/beta/source/modules/calls/toggleVoiceChannelChat.tsx
github-actions 30c0bb2ec3 chore: update source for beta 347.10
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4975.js (118.4 MB)
2026-09-24 16:03:38 +00:00

40 lines
1.3 KiB
TypeScript

// Module ID: 14834
// Function ID: 14835
// Name: toggleVoiceChannelChat
// Dependencies: [2045, 4813, 4806, 4991, 2]
// Exports: toggleVoiceChannelChat
// Module 14834 (toggleVoiceChannelChat)
import ChannelRTCActionCreatorsDefault from "ChannelRTCActionCreators" /* 4991 */;
import ChannelStore from "ChannelStore" /* 2045 */;
import RTCConnectionStore from "RTCConnectionStore" /* 4813 */;
import ChannelRTCStore from "ChannelRTCStore" /* 4806 */;
const size = fn(2);
const result = size.fileFinishedImporting("modules/calls/toggleVoiceChannelChat.tsx");
export const toggleVoiceChannelChat = function toggleVoiceChannelChat(open) {
if (RTCConnectionStore.isConnected()) {
const channelId = obj.getChannelId();
if (null == channelId) {
return null;
} else {
const channel = ChannelStore.getChannel(channelId);
if (null != channel) {
if (channel.isGuildVoice()) {
let tmp3 = open;
if (open == null) {
tmp3 = !ChannelRTCStore.getChatOpen(channelId);
}
ChannelRTCActionCreatorsDefault.updateChatOpen(channelId, tmp3);
const obj2 = { channelId, chatOpen: tmp3 };
return obj2;
}
}
return null;
}
} else {
return null;
}
obj = RTCConnectionStore;
};