decord/source/modules/calls/toggleVoiceChannelChat.tsx

41 lines
1.3 KiB
TypeScript
Raw Normal View History

// Module ID: 14565
// Function ID: 14566
2026-07-20 16:05:17 +00:00
// Name: toggleVoiceChannelChat
// Dependencies: [1957, 4629, 4622, 4807, 2]
2026-07-20 16:05:17 +00:00
// Exports: toggleVoiceChannelChat
// Module 14565 (toggleVoiceChannelChat)
import ChannelRTCActionCreatorsDefault from "ChannelRTCActionCreators" /* 4807 */;
import ChannelStore from "ChannelStore" /* 1957 */;
import RTCConnectionStore from "RTCConnectionStore" /* 4629 */;
import ChannelRTCStore from "ChannelRTCStore" /* 4622 */;
2026-07-23 10:11:24 +00:00
const size = fn(2);
const result = size.fileFinishedImporting("modules/calls/toggleVoiceChannelChat.tsx");
2026-07-20 16:05:17 +00:00
export const toggleVoiceChannelChat = function toggleVoiceChannelChat(open) {
if (RTCConnectionStore.isConnected()) {
2026-07-29 08:29:29 +00:00
const channelId = obj.getChannelId();
2026-07-20 16:05:17 +00:00
if (null == channelId) {
return null;
} else {
const channel = ChannelStore.getChannel(channelId);
2026-07-20 16:05:17 +00:00
if (null != channel) {
if (channel.isGuildVoice()) {
2026-07-29 08:29:29 +00:00
let tmp3 = open;
if (open == null) {
tmp3 = !ChannelRTCStore.getChatOpen(channelId);
2026-07-20 16:05:17 +00:00
}
ChannelRTCActionCreatorsDefault.updateChatOpen(channelId, tmp3);
const obj2 = { channelId, chatOpen: tmp3 };
return obj2;
2026-07-20 16:05:17 +00:00
}
}
return null;
}
} else {
return null;
}
obj = RTCConnectionStore;
2026-07-20 16:05:17 +00:00
};