decord/source/actions/SelectedChannelActionCreatorsAdditional.native.tsx

74 lines
2.8 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 4976
// Function ID: 4977
2026-07-20 16:05:17 +00:00
// Name: selectVoiceChannelAdditional
2026-08-15 05:55:55 +00:00
// Dependencies: [1391, 1910, 4977, 4021, 1979, 1922, 4542, 4978, 4979, 4986, 4093, 4987, 4988, 4342, 6707, 2007, 13059, 514, 709, 2]
2026-07-20 16:05:17 +00:00
// Exports: selectVoiceChannelAdditional
2026-08-15 05:55:55 +00:00
// Module 4976 (selectVoiceChannelAdditional)
2026-07-29 08:29:29 +00:00
import ensureGuildLoaded from "ensureGuildLoaded";
import createGuildRecordFromRust from "createGuildRecordFromRust";
import recomputeGuild from "recomputeGuild";
import getUncachedChannelPermissions from "getUncachedChannelPermissions";
import handleConnectionOpen from "handleConnectionOpen";
import mergeGuildAvatar from "mergeGuildAvatar";
import updateVoiceState from "updateVoiceState";
2026-07-23 10:11:24 +00:00
import { STAGE_BOOSTING_SHEET_KEY } from "MAX_STAGE_TOPIC_LENGTH";
const require = arg1;
2026-07-29 08:29:29 +00:00
const result = require("recomputeGuild").fileFinishedImporting("actions/SelectedChannelActionCreatorsAdditional.native.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const selectVoiceChannelAdditional = function selectVoiceChannelAdditional(id, guildId, flag, flag2, arg4) {
const _require = id;
2026-07-20 16:05:17 +00:00
const importDefault = guildId;
if (flag === undefined) {
flag = false;
}
if (flag2 === undefined) {
flag2 = false;
}
2026-07-29 08:29:29 +00:00
let obj = arg4;
if (arg4 === undefined) {
2026-07-20 16:05:17 +00:00
obj = {};
}
let flag3 = obj.lockVoiceStateForResume;
if (flag3 === undefined) {
flag3 = false;
}
let flag4 = obj.bypassIdleUpdate;
if (flag4 === undefined) {
flag4 = false;
}
2026-07-29 08:29:29 +00:00
const channel = flag2.getChannel(id);
2026-07-23 10:11:24 +00:00
currentUser = currentUser.getCurrentUser();
2026-07-20 16:05:17 +00:00
if (null != currentUser) {
if (null != channel) {
2026-07-29 08:29:29 +00:00
const isChannelFullResult = _require(flag[8]).isChannelFull(channel, updateVoiceState, flag3);
2026-07-23 10:11:24 +00:00
const check = flag4.getCheck(channel.guild_id);
2026-07-20 16:05:17 +00:00
if (!check.canChat) {
2026-07-29 08:29:29 +00:00
let tmp14Result = tmp14(tmp15[9]);
if (!tmp14Result.canLurkerListen(channel)) {
tmp14Result = tmp14(tmp15[10]);
return tmp14Result.unverifiedVoiceGate(check);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
const tmp4 = importDefault(flag[11])(channel, getUncachedChannelPermissions);
2026-07-20 16:05:17 +00:00
if (isChannelFullResult) {
if (channel.isGuildStageVoice()) {
2026-07-29 08:29:29 +00:00
if (tmp14Result1.getStageHasMedia(channel.id)) {
obj = { channel: null };
obj[0] = channel;
importDefault(tmp15[13]).openLazy(tmp14(tmp15[15])(tmp15[14], tmp15.paths), STAGE_BOOSTING_SHEET_KEY, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp14Result1 = tmp14(tmp15[12]);
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-23 10:11:24 +00:00
importDefault(flag[16])(() => {
2026-07-29 08:29:29 +00:00
let obj = id(flag[17]);
2026-07-20 16:05:17 +00:00
const v4Result = obj.v4();
2026-07-29 08:29:29 +00:00
obj = { type: "VOICE_CHANNEL_SELECT", guildId, channelId: id, currentVoiceChannelId: outer1_7.getVoiceChannelId(), video: flag, stream: flag2, lockVoiceStateForResume: flag3, joinVoiceId: v4Result, bypassIdleUpdate: flag4 };
2026-07-23 10:11:24 +00:00
guildId(flag[18]).dispatch(obj);
2026-07-29 08:29:29 +00:00
}, id, flag2, flag);
2026-07-20 16:05:17 +00:00
}
};