41 lines
1.3 KiB
TypeScript
41 lines
1.3 KiB
TypeScript
// Module ID: 9014
|
|
// Function ID: 9015
|
|
// Name: isVoiceEmbeddedActivity
|
|
// Dependencies: [502, 2051, 2103, 4909, 1106, 2]
|
|
// Exports: default
|
|
|
|
// Module 9014 (isVoiceEmbeddedActivity)
|
|
import ChannelTypes from "ChannelTypes" /* 1106 */;
|
|
import AuthenticationStore from "AuthenticationStore" /* 502 */;
|
|
import ChannelStore from "ChannelStore" /* 2051 */;
|
|
import SelectedChannelStore from "SelectedChannelStore" /* 2103 */;
|
|
import VoiceStateStore from "VoiceStateStore" /* 4909 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const result = size.fileFinishedImporting("modules/activities/utils/isVoiceEmbeddedActivity.tsx");
|
|
|
|
export default function isVoiceEmbeddedActivity(arg0) {
|
|
let obj = arg1;
|
|
if (arg1 === undefined) {
|
|
obj = ChannelStore;
|
|
}
|
|
const channel = obj.getChannel(arg0);
|
|
let tmp3 = null != channel;
|
|
if (tmp3) {
|
|
let tmp6 = channel.type === ChannelTypes.ChannelTypes.GUILD_VOICE;
|
|
if (!tmp6) {
|
|
let isPrivateResult = channel.isPrivate();
|
|
if (isPrivateResult) {
|
|
let tmp8 = channel.id === tmp2;
|
|
if (!tmp8) {
|
|
const voiceStatesForChannel = VoiceStateStore.getVoiceStatesForChannel(channel.id);
|
|
tmp8 = null != voiceStatesForChannel[AuthenticationStore.getId(AuthenticationStore)];
|
|
}
|
|
isPrivateResult = tmp8;
|
|
}
|
|
tmp6 = isPrivateResult;
|
|
}
|
|
tmp3 = tmp6;
|
|
}
|
|
return tmp3;
|
|
};
|