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

46 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 13106
// Function ID: 13107
2026-07-20 16:05:17 +00:00
// Name: getActivityChannelId
2026-10-09 10:00:15 +00:00
// Dependencies: [2068, 2064, 5112, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-10-09 10:00:15 +00:00
// Module 13106 (getActivityChannelId)
import ChannelRecord from "ChannelRecord" /* 2068 */;
import ChannelStore from "ChannelStore" /* 2064 */;
import VoiceStateStore from "VoiceStateStore" /* 5112 */;
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) {
2026-10-03 08:58:59 +00:00
let activity;
let channelId;
2026-07-20 16:05:17 +00:00
({ channelId, activity } = userId);
2026-10-03 08:58:59 +00:00
userId = userId.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-10-03 08:58:59 +00:00
const getVoiceStateForSession = VoiceStateStore.getVoiceStateForSession;
2026-07-29 08:29:29 +00:00
if (activity != null) {
2026-07-20 16:05:17 +00:00
session_id1 = activity.session_id;
}
2026-10-03 08:58:59 +00:00
const voiceStateForSession = getVoiceStateForSession(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
};