decord/source/utils/native/PrivateChannelCallUtils.tsx

620 lines
21 KiB
TypeScript
Raw Normal View History

2026-09-03 10:05:34 +00:00
// Module ID: 4728
// Function ID: 4729
2026-07-29 08:29:29 +00:00
// Name: openChannelCallModal
2026-09-03 10:05:34 +00:00
// Dependencies: [5, 19, 4186, 4729, 1386, 4130, 1980, 1921, 673, 1218, 4731, 21, 4732, 4722, 9668, 1228, 4724, 9543, 2008, 6055, 6060, 4445, 13657, 5364, 4859, 1233, 5092, 4340, 13692, 4860, 9897, 4332, 8684, 2]
2026-07-29 08:29:29 +00:00
// Exports: dismissVoiceChannelScreens, getVoiceChannelKey, getVoiceChannelKeyByChannelId, handleJoinCall, handleRedesignGroupDMCall, handleRedesignJoinCall, handleStartCall, hideVoiceChannelActionSheet, isVoiceChannelModalKey, maybeShowAgeGateModal, navigateToVoiceChannel, openGuildVoiceModal, openVoiceChannelActionSheet, showGuardCallAlert
2026-07-20 16:05:17 +00:00
2026-09-03 10:05:34 +00:00
// Module 4728 (openChannelCallModal)
2026-09-02 09:53:35 +00:00
import asyncRequireImpl from "asyncRequireImpl" /* 2008 */;
2026-09-01 10:26:29 +00:00
import coerceMainRoute from "coerceMainRoute" /* 4332 */;
import ACTION_SHEET_HEIGHT_HALFDefault from "ACTION_SHEET_HEIGHT_HALF" /* 4445 */;
2026-09-03 10:05:34 +00:00
import _modDef4722 from "module_4722" /* 4722 */;
import _modDef4724 from "module_4724" /* 4724 */;
import shouldShowAgeGateForVoiceChannel from "shouldShowAgeGateForVoiceChannel" /* 4732 */;
import _modDef4859 from "module_4859" /* 4859 */;
import runAfterInteractions from "runAfterInteractions" /* 6055 */;
import openStageChannelSettings from "openStageChannelSettings" /* 8684 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "asyncGeneratorStep" /* 5 */;
import closure_4 from "noop" /* 19 */;
2026-09-01 10:26:29 +00:00
import closure_5 from "setContent" /* 4186 */;
2026-09-03 10:05:34 +00:00
import closure_6 from "withEqualityFn" /* 4729 */;
2026-09-02 09:53:35 +00:00
import closure_7 from "ensureGuildLoaded" /* 1386 */;
2026-09-01 10:26:29 +00:00
import closure_8 from "markAllUserIdListsStale" /* 4130 */;
2026-09-02 09:53:35 +00:00
import closure_9 from "handleConnectionOpen" /* 1980 */;
import closure_10 from "mergeGuildAvatar" /* 1921 */;
import ME from "ME" /* 673 */;
import { AgeGateSource } from "result" /* 1218 */;
2026-09-03 10:05:34 +00:00
import { NativePermissionTypes } from "NativePermissionStatus" /* 4731 */;
2026-08-24 06:08:38 +00:00
import { jsx } from "jsxProd" /* 21 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function openChannelCallModal(channel) {
2026-08-24 06:08:38 +00:00
let obj = shouldShowAgeGateForVoiceChannel;
2026-07-20 16:05:17 +00:00
if (!obj.maybeOpenAgeGateForVoiceChannel(channel.id)) {
2026-09-03 10:05:34 +00:00
const result = _modDef4722.rebuildRTCActiveChannels();
const obj2 = _modDef4722;
2026-07-29 08:29:29 +00:00
const tmp3 = importDefault;
if (tmpResult.isVoicePanelEnabled(channel)) {
2026-07-23 10:11:24 +00:00
state = state.getState();
2026-07-20 16:05:17 +00:00
state.openChannel(channel.id);
2026-09-02 09:53:35 +00:00
const ComponentDispatch = tmp(1228).ComponentDispatch;
2026-07-29 08:29:29 +00:00
obj = { channelId: null };
obj[0] = channel.id;
2026-07-20 16:05:17 +00:00
ComponentDispatch.dispatch(constants2.VOICE_PANEL_OPEN, obj);
} else {
2026-07-29 08:29:29 +00:00
obj = { channel: null };
obj[0] = channel;
const _HermesInternal = HermesInternal;
2026-09-03 10:05:34 +00:00
const tmp3Result = tmp3(4724);
tmp3Result.pushLazy(tmp(2008)(9543, dependencyMap.paths), obj, "" + c17 + "-" + channel.id);
const tmp5 = tmp(2008)(9543, dependencyMap.paths);
2026-07-20 16:05:17 +00:00
}
2026-09-03 10:05:34 +00:00
tmpResult = tmp(9668);
2026-07-20 16:05:17 +00:00
}
}
function monkeyPatchCall() {
return new Promise((arg0) => {
2026-07-29 08:29:29 +00:00
channel = channel.getChannel(voiceChannelId.getVoiceChannelId());
2026-07-20 16:05:17 +00:00
if (null != channel) {
2026-07-29 08:29:29 +00:00
const _HermesInternal = HermesInternal;
const combined = "" + closure_17 + "-" + channel.id;
2026-09-03 10:05:34 +00:00
callback(4724).popWithKey(combined, undefined);
2026-07-29 08:29:29 +00:00
if (key.getKey() === combined) {
2026-09-01 10:26:29 +00:00
tmp5(4445).hideActionSheet();
const tmp5Result = tmp5(4445);
2026-07-29 08:29:29 +00:00
}
2026-09-03 10:05:34 +00:00
const obj = callback(4724);
2026-07-29 08:29:29 +00:00
tmp5 = callback;
2026-07-20 16:05:17 +00:00
}
2026-09-03 10:05:34 +00:00
const voiceChannel = callback(5364).selectVoiceChannel(null);
2026-07-20 16:05:17 +00:00
const timerId = setTimeout(arg0, 500);
});
}
function guardPrivateCallForChannel(id, arg1) {
2026-07-29 08:29:29 +00:00
let _require = arg1;
2026-07-23 10:11:24 +00:00
channel = channel.getChannel(voiceChannelId.getVoiceChannelId());
2026-07-20 16:05:17 +00:00
if (null != channel) {
if (channel.type !== constants.GUILD_VOICE) {
if (null != id) {
if (id.id !== channel.id) {
2026-07-29 08:29:29 +00:00
_require = callback(function*() {
if (c2 === 2) {
c2 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
c2 = 2;
if (0 === c1) {
if (arg0 === 1) {
c2 = 3;
throw arg1;
} else if (arg0 === 2) {
c2 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
const callback = tmp4;
c1 = 1;
c2 = 1;
2026-08-24 06:08:38 +00:00
obj1 = { value: null, done: false };
obj1[0] = closure_1_19();
2026-07-29 08:29:29 +00:00
return obj1;
}
} else if (arg0 === 1) {
c2 = 3;
throw arg1;
} else if (arg0 === 2) {
c2 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
callback();
c2 = 3;
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} catch (tmp9) {
c2 = tmp;
throw tmp9;
}
}
});
2026-09-03 10:05:34 +00:00
let obj = _modDef4859;
2026-07-29 08:29:29 +00:00
obj = { title: null, body: null, cancelText: null, onConfirm: null, onCancel: null };
2026-09-02 09:53:35 +00:00
const intl = _require(1233).intl;
obj[0] = intl.string(_require(1233).t["91WuJ9"]);
const intl2 = _require(1233).intl;
obj[1] = intl2.string(_require(1233).t["Rs+Vk1"]);
const intl3 = _require(1233).intl;
obj[2] = intl3.string(_require(1233).t["ETE/oC"]);
2026-07-29 08:29:29 +00:00
obj[3] = function onConfirm() {
return callback();
};
obj[4] = closure_13;
obj.show(obj);
2026-07-20 16:05:17 +00:00
}
}
}
}
arg1();
}
2026-07-29 08:29:29 +00:00
({ ChannelTypes: unpackModuleId, ComponentActions: closure_12, NOOP: map1 } = ME);
2026-07-23 10:11:24 +00:00
let c17 = "voice-channel";
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("utils/native/PrivateChannelCallUtils.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const getVoiceChannelKeyByChannelId = function getVoiceChannelKeyByChannelId(arg0) {
return "" + c17 + "-" + arg0;
};
export const getVoiceChannelKey = function getVoiceChannelKey(id) {
return "" + c17 + "-" + id;
};
2026-07-20 16:05:17 +00:00
export const isVoiceChannelModalKey = function isVoiceChannelModalKey(openModalKey) {
2026-07-23 10:11:24 +00:00
return openModalKey.startsWith(c17);
2026-07-20 16:05:17 +00:00
};
export { openChannelCallModal };
2026-07-29 08:29:29 +00:00
export const maybeShowAgeGateModal = function maybeShowAgeGateModal(width) {
if (obj.shouldShowAgeGateForChannelId(width)) {
2026-08-24 06:08:38 +00:00
runAfterInteractions.runAfterInteractions(() => {
2026-07-29 08:29:29 +00:00
callback(table[20]).openAgeGateModal(constants.NSFW_VOICE_CHANNEL);
2026-07-20 16:05:17 +00:00
}, 150);
2026-08-24 06:08:38 +00:00
const tmpResult = runAfterInteractions;
2026-07-20 16:05:17 +00:00
}
};
2026-07-29 08:29:29 +00:00
export const openVoiceChannelActionSheet = function openVoiceChannelActionSheet(closure_0) {
2026-08-24 06:08:38 +00:00
let obj = ACTION_SHEET_HEIGHT_HALFDefault;
2026-07-29 08:29:29 +00:00
obj = { channel: closure_0 };
2026-09-03 10:05:34 +00:00
obj.openLazy(asyncRequireImpl(13657, dependencyMap.paths), "" + c17 + "-" + closure_0.id, obj);
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
export const hideVoiceChannelActionSheet = function hideVoiceChannelActionSheet(closure_0) {
2026-08-24 06:08:38 +00:00
ACTION_SHEET_HEIGHT_HALFDefault.hideActionSheet("" + c17 + "-" + closure_0.id);
2026-07-29 08:29:29 +00:00
};
export const dismissVoiceChannelScreens = function dismissVoiceChannelScreens(channel, onExited) {
const combined = "" + c17 + "-" + channel.id;
2026-09-03 10:05:34 +00:00
_modDef4724.popWithKey(combined, onExited);
2026-07-29 08:29:29 +00:00
if (key.getKey() === combined) {
2026-08-24 06:08:38 +00:00
ACTION_SHEET_HEIGHT_HALFDefault.hideActionSheet();
const tmp2Result = ACTION_SHEET_HEIGHT_HALFDefault;
2026-07-29 08:29:29 +00:00
}
2026-07-20 16:05:17 +00:00
};
export { monkeyPatchCall };
2026-07-29 08:29:29 +00:00
export const showGuardCallAlert = function showGuardCallAlert(arg0) {
const _require = arg0;
2026-09-03 10:05:34 +00:00
let obj = _modDef4859;
2026-07-29 08:29:29 +00:00
obj = { title: null, body: null, cancelText: null, onConfirm: null, onCancel: null };
2026-09-02 09:53:35 +00:00
const intl = _require(1233).intl;
obj[0] = intl.string(_require(1233).t["91WuJ9"]);
const intl2 = _require(1233).intl;
obj[1] = intl2.string(_require(1233).t["Rs+Vk1"]);
const intl3 = _require(1233).intl;
obj[2] = intl3.string(_require(1233).t["ETE/oC"]);
2026-07-29 08:29:29 +00:00
obj[3] = function onConfirm() {
return callback();
};
obj[4] = closure_13;
obj.show(obj);
};
2026-07-20 16:05:17 +00:00
export { guardPrivateCallForChannel };
export const handleJoinCall = function handleJoinCall(channel, flag) {
2026-08-24 06:08:38 +00:00
closure_0 = channel;
2026-07-20 16:05:17 +00:00
if (flag === undefined) {
flag = false;
}
2026-07-29 08:29:29 +00:00
function _onConfirm() {
const self = this;
2026-08-24 06:08:38 +00:00
const tmp = closure_1_3(function*() {
2026-07-29 08:29:29 +00:00
if (dependencyMap === 2) {
dependencyMap = 3;
HermesBuiltin.throwTypeError();
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
dependencyMap = 2;
if (0 === v0) {
if (arg0 === 1) {
dependencyMap = 3;
throw arg1;
} else if (arg0 === 2) {
dependencyMap = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
const id = tmp4;
if (v0) {
v0 = 1;
dependencyMap = 1;
2026-08-24 06:08:38 +00:00
obj1 = { value: null, done: false };
2026-09-03 10:05:34 +00:00
obj1[0] = v0(5092).requestPermission(closure_1_15.CAMERA);
2026-07-29 08:29:29 +00:00
return obj1;
}
}
} else if (arg0 === 1) {
dependencyMap = 3;
throw arg1;
} else if (arg0 === 2) {
dependencyMap = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else if (!arg1) {
dependencyMap = 3;
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
2026-09-01 10:26:29 +00:00
obj1 = closure_1_0(4340);
2026-07-29 08:29:29 +00:00
obj1.dismissKeyboard();
2026-09-03 10:05:34 +00:00
const voiceChannel = v0(5364).selectVoiceChannel(id.id, v0);
2026-07-29 08:29:29 +00:00
dependencyMap = 3;
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
} catch (tmp17) {
dependencyMap = tmp;
throw tmp17;
}
}
});
2026-08-24 06:08:38 +00:00
closure_2 = tmp;
2026-07-29 08:29:29 +00:00
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
guardPrivateCallForChannel(channel, function onConfirm() {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _onConfirm.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
});
};
export const handleStartCall = function handleStartCall(channel, flag) {
2026-07-29 08:29:29 +00:00
const _require = channel;
2026-07-20 16:05:17 +00:00
if (flag === undefined) {
flag = false;
}
2026-07-29 08:29:29 +00:00
function _onConfirm2() {
const self = this;
2026-08-24 06:08:38 +00:00
const tmp = closure_1_3(function*() {
2026-07-29 08:29:29 +00:00
if (c3 === 2) {
c3 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp4 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
c3 = 2;
if (0 === dependencyMap) {
if (arg0 === 1) {
c3 = 3;
throw arg1;
} else if (arg0 === 2) {
c3 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
c1 = tmp5;
let isFriendResult = tmp2;
isFriendResult = undefined;
2026-07-29 08:29:29 +00:00
c1 = undefined;
2026-08-24 06:08:38 +00:00
if (recipientId) {
2026-07-29 08:29:29 +00:00
dependencyMap = 1;
c3 = 1;
2026-08-24 06:08:38 +00:00
obj1 = { value: null, done: false };
2026-09-03 10:05:34 +00:00
obj1[0] = recipientId(5092).requestPermission(closure_1_15.CAMERA);
2026-07-29 08:29:29 +00:00
return obj1;
}
}
} else if (arg0 === 1) {
c3 = 3;
throw arg1;
} else if (arg0 === 2) {
c3 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else if (!arg1) {
c3 = 3;
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
2026-09-01 10:26:29 +00:00
obj1 = isFriendResult(4340);
2026-07-29 08:29:29 +00:00
obj1.dismissKeyboard();
2026-08-24 06:08:38 +00:00
isFriendResult = isFriendResult.type !== closure_1_11.DM;
2026-07-29 08:29:29 +00:00
if (!isFriendResult) {
2026-08-24 06:08:38 +00:00
isFriendResult = closure_1_8.isFriend(isFriendResult.getRecipientId());
2026-07-29 08:29:29 +00:00
}
2026-08-24 06:08:38 +00:00
recipientId = null;
if (!isFriendResult) {
recipientId = isFriendResult.getRecipientId();
2026-07-29 08:29:29 +00:00
}
2026-09-03 10:05:34 +00:00
const tmp25 = recipientId(9897);
2026-07-29 08:29:29 +00:00
const call = tmp25.call;
2026-08-24 06:08:38 +00:00
const id = isFriendResult.id;
let tmp28 = isFriendResult;
if (isFriendResult) {
tmp28 = !isFriendResult.isManaged();
2026-07-29 08:29:29 +00:00
}
2026-08-24 06:08:38 +00:00
let tmp25Result = recipientId;
2026-07-29 08:29:29 +00:00
if (typeof call === "unknown") {
tmp25Result = tmp25(tmp27, tmp28, tmp25Result);
} else {
call(id, tmp27, tmp28, tmp25Result);
}
c3 = 3;
} catch (tmp36) {
c3 = tmp;
throw tmp36;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
});
2026-08-24 06:08:38 +00:00
closure_2 = tmp;
2026-07-29 08:29:29 +00:00
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
}
let flag2 = false;
if (channel.isDM()) {
user = user.getUser(channel.getRecipientId());
let isProvisional;
if (user != null) {
isProvisional = user.isProvisional;
}
flag2 = false;
if (isProvisional) {
const lazyResult = React.lazy(() => channel(_onConfirm2[18])(_onConfirm2[28], _onConfirm2.paths));
_require(_onConfirm2[29]).openAlert("ProvisionalAccountNocallAllowed", <lazyResult />);
flag2 = true;
let obj = _require(_onConfirm2[29]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
if (!flag2) {
2026-07-20 16:05:17 +00:00
guardPrivateCallForChannel(channel, function onConfirm() {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _onConfirm2.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
});
}
};
export const handleRedesignGroupDMCall = function handleRedesignGroupDMCall(id) {
2026-08-24 06:08:38 +00:00
closure_0 = id;
2026-07-29 08:29:29 +00:00
let flag = arg1;
2026-07-20 16:05:17 +00:00
if (arg1 === undefined) {
flag = false;
}
2026-07-29 08:29:29 +00:00
function _onConfirm3() {
const self = this;
2026-08-24 06:08:38 +00:00
const tmp = closure_1_3(function*() {
2026-07-29 08:29:29 +00:00
if (dependencyMap === 2) {
dependencyMap = 3;
HermesBuiltin.throwTypeError();
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
dependencyMap = 2;
if (0 === v0) {
if (arg0 === 1) {
dependencyMap = 3;
throw arg1;
} else if (arg0 === 2) {
dependencyMap = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
id = tmp4;
2026-07-29 08:29:29 +00:00
if (v0) {
v0 = 1;
dependencyMap = 1;
2026-08-24 06:08:38 +00:00
obj1 = { value: null, done: false };
2026-09-03 10:05:34 +00:00
obj1[0] = v0(5092).requestPermission(closure_1_15.CAMERA);
2026-07-29 08:29:29 +00:00
return obj1;
}
}
} else if (arg0 === 1) {
dependencyMap = 3;
throw arg1;
} else if (arg0 === 2) {
dependencyMap = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else if (!arg1) {
dependencyMap = 3;
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
2026-09-01 10:26:29 +00:00
obj1 = closure_1_0(4340);
2026-07-29 08:29:29 +00:00
obj1.dismissKeyboard();
2026-09-03 10:05:34 +00:00
const tmp11 = v0(9897);
2026-07-29 08:29:29 +00:00
const call = tmp11.call;
id = id.id;
if (typeof call === "unknown") {
tmp11(tmp13, true);
} else {
call(id, tmp13, true);
}
dependencyMap = 3;
} catch (tmp18) {
dependencyMap = tmp;
throw tmp18;
}
}
});
2026-08-24 06:08:38 +00:00
closure_2 = tmp;
2026-07-29 08:29:29 +00:00
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
guardPrivateCallForChannel(id, function onConfirm() {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _onConfirm3.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
});
};
export const handleRedesignJoinCall = function handleRedesignJoinCall(id) {
2026-08-24 06:08:38 +00:00
closure_0 = id;
2026-07-29 08:29:29 +00:00
let flag = arg1;
2026-07-20 16:05:17 +00:00
if (arg1 === undefined) {
flag = false;
}
2026-07-29 08:29:29 +00:00
function _onConfirm4() {
const self = this;
2026-08-24 06:08:38 +00:00
const tmp = closure_1_3(function*() {
2026-07-29 08:29:29 +00:00
if (dependencyMap === 2) {
dependencyMap = 3;
HermesBuiltin.throwTypeError();
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
dependencyMap = 2;
if (0 === v0) {
if (arg0 === 1) {
dependencyMap = 3;
throw arg1;
} else if (arg0 === 2) {
dependencyMap = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
id = tmp4;
2026-07-29 08:29:29 +00:00
if (v0) {
v0 = 1;
dependencyMap = 1;
2026-08-24 06:08:38 +00:00
obj1 = { value: null, done: false };
2026-09-03 10:05:34 +00:00
obj1[0] = v0(5092).requestPermission(closure_1_15.CAMERA);
2026-07-29 08:29:29 +00:00
return obj1;
}
}
} else if (arg0 === 1) {
dependencyMap = 3;
throw arg1;
} else if (arg0 === 2) {
dependencyMap = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else if (!arg1) {
dependencyMap = 3;
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
2026-09-01 10:26:29 +00:00
obj1 = closure_1_0(4340);
2026-07-29 08:29:29 +00:00
obj1.dismissKeyboard();
2026-09-03 10:05:34 +00:00
const voiceChannel = v0(5364).selectVoiceChannel(id.id, v0);
2026-07-29 08:29:29 +00:00
dependencyMap = 3;
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
} catch (tmp17) {
dependencyMap = tmp;
throw tmp17;
}
}
});
2026-08-24 06:08:38 +00:00
closure_2 = tmp;
2026-07-29 08:29:29 +00:00
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
guardPrivateCallForChannel(id, function onConfirm() {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _onConfirm4.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
});
};
2026-07-29 08:29:29 +00:00
export const openGuildVoiceModal = function openGuildVoiceModal(channel, newestAnalyticsLocation) {
const combined = "" + c17 + "-" + channel.id;
if (!obj.isModalOpen(combined)) {
openChannelCallModal(channel);
}
};
2026-07-20 16:05:17 +00:00
export const navigateToVoiceChannel = function navigateToVoiceChannel(channel, LiveActivity) {
if (channel.isPrivate()) {
openChannelCallModal(channel);
} else if (channel.isGuildStageVoice()) {
2026-08-24 06:08:38 +00:00
openStageChannelSettings.openStageChannel(channel);
const obj2 = openStageChannelSettings;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const _HermesInternal = HermesInternal;
const combined = "" + c17 + "-" + channel.id;
if (!obj.isModalOpen(combined)) {
openChannelCallModal(channel);
}
2026-08-24 06:08:38 +00:00
obj = coerceMainRoute;
2026-07-20 16:05:17 +00:00
}
};