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

42 lines
1.2 KiB
TypeScript
Raw Normal View History

// Module ID: 12816
// Function ID: 12817
2026-07-20 16:05:17 +00:00
// Name: getActivityChannelId
// Dependencies: [2048, 2044, 4864, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 12816 (getActivityChannelId)
import ChannelRecord from "ChannelRecord" /* 2048 */;
import ChannelStore from "ChannelStore" /* 2044 */;
import VoiceStateStore from "VoiceStateStore" /* 4864 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const isTextChannel = ChannelRecord.isTextChannel;
const result = size.fileFinishedImporting("modules/activities/utils/getActivityChannelId.tsx");
2026-07-20 16:05:17 +00:00
export default function getActivityChannelId(userId) {
({ channelId, activity } = userId);
const channel = ChannelStore.getChannel(channelId);
2026-07-20 16:05:17 +00:00
let session_id;
2026-07-29 08:29:29 +00:00
if (activity != null) {
2026-07-20 16:05:17 +00:00
session_id = activity.session_id;
}
let tmp3 = channelId;
if (null != session_id) {
if (null == channel) {
let session_id1;
2026-07-29 08:29:29 +00:00
if (activity != null) {
2026-07-20 16:05:17 +00:00
session_id1 = activity.session_id;
}
const voiceStateForSession = VoiceStateStore.getVoiceStateForSession(userId.userId, session_id1);
let channelId1;
2026-07-29 08:29:29 +00:00
if (voiceStateForSession != null) {
channelId1 = voiceStateForSession.channelId;
2026-07-20 16:05:17 +00:00
}
tmp3 = channelId1;
2026-07-20 16:05:17 +00:00
} else {
tmp3 = channelId;
}
}
2026-07-29 08:29:29 +00:00
return tmp3;
2026-07-20 16:05:17 +00:00
};