decord/beta/source/actions/SelectedChannelActionCreatorsAdditional.native.tsx
github-actions 19e52f659f chore: update source for beta 347.11
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
2026-09-26 17:57:22 +00:00

89 lines
3.3 KiB
TypeScript

// Module ID: 5661
// Function ID: 5662
// Name: SelectedChannelActionCreatorsAdditional
// Dependencies: [2041, 2063, 5662, 4427, 2095, 4609, 1372, 4807, 5663, 4933, 5664, 4485, 5665, 5666, 4755, 5679, 1980, 13920, 1255, 573, 2]
// Exports: getChannelSelectionOrigin, selectVoiceChannelAdditional
// Module 5661 (SelectedChannelActionCreatorsAdditional)
import DispatcherDefault from "Dispatcher" /* 573 */;
import v1 from "v1" /* 1255 */;
import ChannelStore from "ChannelStore" /* 2041 */;
import GuildStore from "GuildStore" /* 2063 */;
import GuildVerificationStore from "GuildVerificationStore" /* 5662 */;
import PermissionStore from "PermissionStore" /* 4427 */;
import SelectedChannelStore from "SelectedChannelStore" /* 2095 */;
import SelectedGuildStore from "SelectedGuildStore" /* 4609 */;
import UserStore from "UserStore" /* 1372 */;
import VoiceStateStore from "VoiceStateStore" /* 4807 */;
const require = globalThis.__r;
require = fn;
const STAGE_BOOSTING_SHEET_KEY = fn(5663).STAGE_BOOSTING_SHEET_KEY;
const size = fn(2);
const result = size.fileFinishedImporting("actions/SelectedChannelActionCreatorsAdditional.native.tsx");
export const getChannelSelectionOrigin = function getChannelSelectionOrigin() {
let guildId = SelectedGuildStore.getGuildId();
if (guildId == null) {
guildId = null;
}
const obj = { fromGuildId: guildId, fromChannelId: null };
let channelId = SelectedChannelStore.getChannelId(guildId, false);
if (channelId == null) {
channelId = null;
}
obj.fromChannelId = channelId;
return obj;
};
export const selectVoiceChannelAdditional = function selectVoiceChannelAdditional(id, guildId, flag, flag2, arg4) {
_require = id;
importDefault = guildId;
if (flag === undefined) {
flag = false;
}
if (flag2 === undefined) {
flag2 = false;
}
let obj = arg4;
if (arg4 === undefined) {
obj = {};
}
let flag3 = obj.lockVoiceStateForResume;
if (flag3 === undefined) {
flag3 = false;
}
let flag4 = obj.bypassIdleUpdate;
if (flag4 === undefined) {
flag4 = false;
}
const channel = flag2.getChannel(id);
const currentUser = UserStore.getCurrentUser();
if (null != currentUser) {
if (null != channel) {
const isChannelFullResult = require("ChannelUtils").isChannelFull(channel, VoiceStateStore, flag3);
const check = flag4.getCheck(channel.guild_id);
if (!check.canChat) {
if (!tmp14Result.canLurkerListen(channel)) {
return tmp14(tmp15[11]).unverifiedVoiceGate(check);
}
tmp14Result = tmp14(tmp15[10]);
}
const tmp4 = require("canJoinVoiceChannel")(channel, PermissionStore);
if (isChannelFullResult) {
if (channel.isGuildStageVoice()) {
if (tmp14Result4.getStageHasMedia(channel.id)) {
let obj2 = { channel };
require("ActionSheetActionCreators").openLazy(tmp14(tmp15[16])(tmp15[15], tmp15.paths), STAGE_BOOSTING_SHEET_KEY, obj2);
}
tmp14Result4 = tmp14(tmp15[13]);
}
}
}
require("collectCallFeedback")(() => {
const v4Result = v1.v4();
const obj2 = DispatcherDefault;
obj2.dispatch({ type: "VOICE_CHANNEL_SELECT", guildId, channelId, currentVoiceChannelId: SelectedChannelStore.getVoiceChannelId(), video: flag, stream: flag2, lockVoiceStateForResume: flag3, joinVoiceId: v4Result, bypassIdleUpdate: flag4 });
}, id, flag2, flag);
}
};