decord/alpha/source/modules/activities/utils/isVoiceEmbeddedActivity.tsx

43 lines
1.3 KiB
TypeScript
Raw Normal View History

// Module ID: 8995
// Function ID: 8996
2026-07-20 16:05:17 +00:00
// Name: isVoiceEmbeddedActivity
// Dependencies: [502, 2044, 2098, 4864, 1095, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 8995 (isVoiceEmbeddedActivity)
import ChannelTypes from "ChannelTypes" /* 1095 */;
import AuthenticationStore from "AuthenticationStore" /* 502 */;
import ChannelStore from "ChannelStore" /* 2044 */;
import SelectedChannelStore from "SelectedChannelStore" /* 2098 */;
import VoiceStateStore from "VoiceStateStore" /* 4864 */;
2026-07-23 10:11:24 +00:00
require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/activities/utils/isVoiceEmbeddedActivity.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default function isVoiceEmbeddedActivity(arg0) {
2026-07-20 16:05:17 +00:00
let obj = arg1;
if (arg1 === undefined) {
obj = ChannelStore;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const channel = obj.getChannel(arg0);
2026-07-20 16:05:17 +00:00
let tmp3 = null != channel;
if (tmp3) {
let tmp6 = channel.type === ChannelTypes.ChannelTypes.GUILD_VOICE;
2026-07-20 16:05:17 +00:00
if (!tmp6) {
2026-07-29 08:29:29 +00:00
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)];
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
isPrivateResult = tmp8;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp6 = isPrivateResult;
2026-07-20 16:05:17 +00:00
}
tmp3 = tmp6;
}
return tmp3;
};