41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
// Module ID: 12026
|
|
// Function ID: 12027
|
|
// Name: getActivityChannelId
|
|
// Dependencies: [1376, 1372, 4205, 2]
|
|
// Exports: default
|
|
|
|
// Module 12026 (getActivityChannelId)
|
|
import { isTextChannel } from "createChannelRecord";
|
|
import ensureGuildLoaded from "ensureGuildLoaded";
|
|
import updateVoiceState from "updateVoiceState";
|
|
|
|
const result = require("updateVoiceState").fileFinishedImporting("modules/activities/utils/getActivityChannelId.tsx");
|
|
|
|
export default function getActivityChannelId(userId) {
|
|
let activity;
|
|
let channelId;
|
|
({ channelId, activity } = userId);
|
|
channel = channel.getChannel(channelId);
|
|
let session_id;
|
|
if (activity != null) {
|
|
session_id = activity.session_id;
|
|
}
|
|
let tmp3 = channelId;
|
|
if (null != session_id) {
|
|
if (null == channel) {
|
|
let session_id1;
|
|
if (activity != null) {
|
|
session_id1 = activity.session_id;
|
|
}
|
|
voiceStateForSession = voiceStateForSession.getVoiceStateForSession(userId.userId, session_id1);
|
|
channelId = undefined;
|
|
if (voiceStateForSession != null) {
|
|
channelId = voiceStateForSession.channelId;
|
|
}
|
|
tmp3 = channelId;
|
|
} else {
|
|
tmp3 = channelId;
|
|
}
|
|
}
|
|
return tmp3;
|
|
};
|