41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
// Module ID: 13980
|
|
// Function ID: 13981
|
|
// Name: toggleVoiceChannelChat
|
|
// Dependencies: [1391, 4454, 4396, 4609, 2]
|
|
// Exports: toggleVoiceChannelChat
|
|
|
|
// Module 13980 (toggleVoiceChannelChat)
|
|
import _modDef4609 from "module_4609" /* 4609 */;
|
|
import closure_2 from "ensureGuildLoaded" /* 1391 */;
|
|
import closure_3 from "createRTCConnection" /* 4454 */;
|
|
import closure_4 from "getParticipants" /* 4396 */;
|
|
|
|
const result = require("set").fileFinishedImporting("modules/calls/toggleVoiceChannelChat.tsx");
|
|
|
|
export const toggleVoiceChannelChat = function toggleVoiceChannelChat(open) {
|
|
let obj = connected;
|
|
if (connected.isConnected()) {
|
|
const channelId = obj.getChannelId();
|
|
if (null == channelId) {
|
|
return null;
|
|
} else {
|
|
channel = channel.getChannel(channelId);
|
|
if (null != channel) {
|
|
if (channel.isGuildVoice()) {
|
|
let tmp3 = open;
|
|
if (open == null) {
|
|
tmp3 = !chatOpen.getChatOpen(channelId);
|
|
}
|
|
_modDef4609.updateChatOpen(channelId, tmp3);
|
|
obj = { channelId: null, chatOpen: null };
|
|
obj[0] = channelId;
|
|
obj[1] = tmp3;
|
|
return obj;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
} else {
|
|
return null;
|
|
}
|
|
};
|