40 lines
1.3 KiB
TypeScript
40 lines
1.3 KiB
TypeScript
// Module ID: 14776
|
|
// Function ID: 14777
|
|
// Name: toggleVoiceChannelChat
|
|
// Dependencies: [2065, 5110, 6036, 5106, 2]
|
|
// Exports: toggleVoiceChannelChat
|
|
|
|
// Module 14776 (toggleVoiceChannelChat)
|
|
import ChannelRTCActionCreatorsDefault from "ChannelRTCActionCreators" /* 5106 */;
|
|
import ChannelStore from "ChannelStore" /* 2065 */;
|
|
import RTCConnectionStore from "RTCConnectionStore" /* 5110 */;
|
|
import ChannelRTCStore from "ChannelRTCStore" /* 6036 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const result = size.fileFinishedImporting("modules/calls/toggleVoiceChannelChat.tsx");
|
|
|
|
export const toggleVoiceChannelChat = function toggleVoiceChannelChat(open) {
|
|
const obj = RTCConnectionStore;
|
|
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);
|
|
}
|
|
const obj3 = ChannelRTCActionCreatorsDefault;
|
|
obj3.updateChatOpen(channelId, tmp3);
|
|
return { channelId, chatOpen: tmp3 };
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
} else {
|
|
return null;
|
|
}
|
|
};
|