1383 lines
69 KiB
TypeScript
1383 lines
69 KiB
TypeScript
/* Metro module 8097; source: modules/activities/EmbeddedActivitiesManager.tsx; dependencies: [6, 7, 15, 17, 18, 5, 4606, 1383, 1226, 1379, 4294, 1934, 1878, 8098, 1378, 661, 8049, 477, 507, 3774, 8099, 8093, 683, 8064, 8100, 8101, 7712, 491, 1861, 7866, 8102, 8067, 8103, 6772, 7858, 1244, 8105, 7860, 8106, 9472, 1909, 6789, 1239, 694, 4561, 2] */
|
|
function _fun64888(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:6, offset: 0x01bb80de, size: 579 bytes, params: 8, frame: 19
|
|
let env0_0 = require;
|
|
const _arrayLikeToArray_64891 = function(a0, a1) {
|
|
var r0;
|
|
var r1;
|
|
var r2;
|
|
var value3;
|
|
var length;
|
|
var value5;
|
|
var value = undefined;
|
|
var value2 = value == null;
|
|
reducibleJoin2: while (true) {
|
|
if (value2) {
|
|
r0 = value2;
|
|
break reducibleJoin2;
|
|
}
|
|
value3 = value > a0.length;
|
|
r0 = value3;
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (r0) {
|
|
length = a0.length;
|
|
r1 = length;
|
|
break reducibleJoin4;
|
|
}
|
|
r1 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
value = (0, global.Array)(r1);
|
|
var value4 = 0;
|
|
if (value4 < r1) {
|
|
r2 = value4;
|
|
reducibleLoop5: while (true) {
|
|
value[r2] = a0[r2];
|
|
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value5 < r1) {
|
|
r2 = value5;
|
|
continue reducibleLoop5;
|
|
}
|
|
break reducibleLoop5;
|
|
}
|
|
}
|
|
return value;
|
|
};
|
|
const clearAwaitingAnalyticsContextAsync = function(a0, a1) {
|
|
var env0_0 = a0;
|
|
var env0_1 = a1;
|
|
global.setTimeout(_fun64899, 2000);
|
|
};
|
|
const handleActivityClose = function() {
|
|
return _handleActivityClose.apply(this, arguments);
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
|
const env0_8 = importDefault(5) /* metro dependency 5 */;
|
|
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
|
|
const env0_10 = (require(1383) /* metro dependency 1383: ChannelRecord */).GUILD_VOCAL_CHANNEL_TYPES;
|
|
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
|
|
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
const activityShelfStore = importDefault(8098) /* metro dependency 8098: ActivityShelfStore */;
|
|
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
|
|
let value = require(661) /* metro dependency 661: Constants */;
|
|
const env0_18 = value.AnalyticEvents;
|
|
const env0_19 = value.RPCCloseCodes;
|
|
const env0_20 = value.Endpoints;
|
|
const env0_21 = value.RTCConnectionStates;
|
|
const env0_22 = value.ComponentActions;
|
|
const env0_23 = {};
|
|
const env0_24 = {};
|
|
const env0_25 = {};
|
|
value = importDefault(4561) /* metro dependency 4561: LifecycleManager */;
|
|
value = _fun64908(value);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/EmbeddedActivitiesManager.tsx');
|
|
exports.default = value;
|
|
exports.trackFrameSessionStart = trackFrameSessionStart;
|
|
exports.getActiveAnalyticsSessionIDs = getActiveAnalyticsSessionIDs;
|
|
exports.trackFrameSessionEnd = trackFrameSessionEnd;
|
|
}
|
|
|
|
function _createForOfIteratorHelperLoose_64889(a0, a1) { // fn#64889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:390, offset: 0x01bb8321, size: 370 bytes, params: 3, frame: 20
|
|
var r6;
|
|
var r9;
|
|
var r5;
|
|
var value3;
|
|
var regexp;
|
|
const env0_0 = a0;
|
|
const Symbol = global.Symbol;
|
|
let value = typeof Symbol !== 'undefined';
|
|
let r1 = value && a0[global.Symbol.iterator];
|
|
r1 = !r1 ? a0['@@iterator'] : r1;
|
|
if (r1) {
|
|
value = r1.call(a0);
|
|
return value.next.bind(value);
|
|
}
|
|
const Array = global.Array;
|
|
if (Array.isArray(a0)) {
|
|
if (r1) {
|
|
}
|
|
return _fun64890;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_64891(a0, value);
|
|
r5 = value;
|
|
} else {
|
|
value3 = ({}).toString.call(a0).slice(8, -1);
|
|
r6 = value3 === 'Object' && a0.constructor;
|
|
r9 = r6 ? a0.constructor.name : value3;
|
|
if (r9 === 'Map') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Set') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Arguments') {
|
|
value = _arrayLikeToArray_64891(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_64891(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun64890;
|
|
}
|
|
const TypeError = global.TypeError;
|
|
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
|
}
|
|
|
|
function _isNativeReflectConstruct_64892() { // fn#64892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:1300, offset: 0x01bb8493, size: 94 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_64892_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function getShelfItemTrackingProperties(a0) { // fn#64895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:1512, offset: 0x01bb84f1, size: 110 bytes, params: 2, frame: 16
|
|
var release_phase;
|
|
var activity;
|
|
var client_platform_config;
|
|
var defaultImport;
|
|
var moduleValue;
|
|
const value = undefined;
|
|
if (a0 == null) {
|
|
release_phase = value;
|
|
} else {
|
|
activity = a0.activity;
|
|
if (activity == null) {
|
|
release_phase = value;
|
|
} else {
|
|
client_platform_config = activity.client_platform_config;
|
|
defaultImport = importDefault(8049) /* metro dependency 8049: getPlatform */;
|
|
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
|
|
release_phase = client_platform_config[defaultImport(moduleValue.getOS())].release_phase;
|
|
}
|
|
}
|
|
return {releasePhase: release_phase};
|
|
}
|
|
|
|
function setAwaitingAnalyticsContext({applicationId, nonce, locations, source}) { // fn#64896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:1687, offset: 0x01bb855f, size: 72 bytes, params: 2, frame: 7
|
|
let r0 = locations != null || source != null;
|
|
if (r0) {
|
|
env0_24[applicationId] = {nonce: nonce, locations: locations, source: source};
|
|
r0 = true;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function clearAwaitingAnalyticsContextImmediate(a0, a1) { // fn#64897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:1839, offset: 0x01bb85a7, size: 47 bytes, params: 3, frame: 5
|
|
const property = env0_24[a0];
|
|
if (property != null) {
|
|
if (property.nonce === a1) {
|
|
delete env0_24[a0];
|
|
return property;
|
|
}
|
|
}
|
|
}
|
|
|
|
function clearAwaitingAnalyticsContextAsync(a0, a1) { // fn#64898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:1948, offset: 0x01bb85d6, size: 45 bytes, params: 3, frame: 13
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
global.setTimeout(_fun64899, 2000);
|
|
}
|
|
|
|
function handleActivityLaunchStart({applicationId, nonce, analyticsLocations, source}) { // fn#64900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:2063, offset: 0x01bb861f, size: 75 bytes, params: 2, frame: 14
|
|
setAwaitingAnalyticsContext({applicationId: applicationId, nonce: nonce, locations: analyticsLocations,
|
|
source: source ?? undefined});
|
|
}
|
|
|
|
function _handleActivityClose() { // fn#64902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:2327, offset: 0x01bb866a, size: 48 bytes, params: 1, frame: 14
|
|
return env0_8(_fun64904).apply(this, arguments);
|
|
}
|
|
|
|
function handleOpenEmbeddedActivity({applicationId, isFirstActivityInChannel, isStart, participants, embeddedActivity, location, inviterUserId}) { // fn#64905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:3790, offset: 0x01bb8993, size: 1413 bytes, params: 2, frame: 38
|
|
var r8;
|
|
var r9;
|
|
var r11;
|
|
var r19;
|
|
var r24;
|
|
var locations;
|
|
var r25;
|
|
var shelf_rank;
|
|
var type;
|
|
var value3;
|
|
var embeddedActivityLocationChannelId;
|
|
var embeddedActivityLocationGuildId;
|
|
var channel;
|
|
var defaultImport;
|
|
var value9;
|
|
var mediaSessionId;
|
|
var compositeInstanceId;
|
|
var value14;
|
|
var value15;
|
|
var currentUser;
|
|
var shelfActivities;
|
|
var shelfOrder;
|
|
var value19;
|
|
var value20;
|
|
var releasePhase;
|
|
var rawThermalState;
|
|
var launchId;
|
|
var property;
|
|
var moduleValue6;
|
|
var defaultImport4;
|
|
var track;
|
|
var ACTIVITY_SESSION_JOINED;
|
|
var value24;
|
|
var kind;
|
|
var defaultImport5;
|
|
var ACTIVITY_IFRAME_MOUNT;
|
|
var stashPendingFrameLaunch;
|
|
var value;
|
|
(require(8064) /* metro dependency 8064: leaveCurrentFrame */).leaveCurrentFrame();
|
|
const tryLaunchAsFrameModule = require(8100) /* metro dependency 8100: tryLaunchAsFrame */;
|
|
const tryLaunchAsFrame = tryLaunchAsFrameModule.tryLaunchAsFrame;
|
|
let object2 = {applicationId: applicationId};
|
|
if (Reflect.apply(tryLaunchAsFrame, tryLaunchAsFrameModule, [object2])) {
|
|
value = require(8101) /* metro dependency 8101: pendingFrameLaunch */;
|
|
stashPendingFrameLaunch = value.stashPendingFrameLaunch;
|
|
object2 = {isStart: isStart, inviterUserId: inviterUserId};
|
|
object2.channelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(location);
|
|
object2.guildId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationGuildId(location);
|
|
object2.locationKind = location.kind;
|
|
object2.launchId = embeddedActivity.launchId;
|
|
object2.compositeInstanceId = embeddedActivity.compositeInstanceId;
|
|
object2.activitiesInfraVersion = 'location' in embeddedActivity ? 2 : 1;
|
|
Reflect.apply(stashPendingFrameLaunch, value, [applicationId, object2]);
|
|
} else {
|
|
var env0_1 = AuthenticationStore.getId();
|
|
value3 = participants.find(_fun64906);
|
|
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(location);
|
|
embeddedActivityLocationGuildId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationGuildId(location);
|
|
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
|
|
r8 = isStart && channel != null;
|
|
r8 = r8 && channel.isPrivate();
|
|
r8 = r8 && isFirstActivityInChannel;
|
|
r8 = r8 && value3 == null;
|
|
if (r8) {
|
|
defaultImport = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
|
|
defaultImport.selectParticipant(channel.id, null);
|
|
}
|
|
value9 = null;
|
|
if (value9 != value3) {
|
|
mediaSessionId = RTCConnectionStore.getMediaSessionId();
|
|
compositeInstanceId = embeddedActivity.compositeInstanceId;
|
|
r9 = value9 == mediaSessionId && (value9 == channel ? undefined : channel.isVocal()) === true;
|
|
r9 = r9 && (value9 == channel ? undefined : channel.isPrivate()) === false;
|
|
if (value9 != compositeInstanceId) {
|
|
if (!r9) {
|
|
value14 = (require(491) /* metro dependency 491 */).v4();
|
|
value15 = 1;
|
|
r11 = 'location' in embeddedActivity ? 2 : value15;
|
|
currentUser = UserStore.getCurrentUser();
|
|
if (value9 != currentUser) {
|
|
shelfActivities = EmbeddedActivitiesStore.getShelfActivities(embeddedActivityLocationGuildId);
|
|
shelfOrder = ActivityShelfStore.getState().shelfOrder;
|
|
value19 = (importDefault(8099) /* metro dependency 8099: getShelfItemData */)({applicationId: applicationId,
|
|
|
|
|
|
|
|
activityConfigs: shelfActivities});
|
|
value20 = value15 + shelfOrder.findIndex(function(a0) {
|
|
return a0 === applicationId;
|
|
});
|
|
releasePhase = getShelfItemTrackingProperties(value19).releasePhase;
|
|
rawThermalState = (importDefault(8093) /* metro dependency 8093: ThermalUtilsNative */).getRawThermalState();
|
|
r19 = value9 != mediaSessionId ? [mediaSessionId] : [];
|
|
launchId = embeddedActivity.launchId;
|
|
env0_23[applicationId] = {activitySessionId: compositeInstanceId,
|
|
activityUserSessionId: value14,
|
|
launchId: launchId, mediaSessionIds: r19, activitiesInfraVersion: r11};
|
|
property = env0_24[applicationId];
|
|
moduleValue6 = require(1861) /* metro dependency 1861: StringUtils */;
|
|
r24 = moduleValue6.isNullOrEmpty(value3.nonce) || value3.nonce === (value9 == property ? undefined : property.nonce) ? property : undefined;
|
|
defaultImport4 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
track = defaultImport4.track;
|
|
ACTIVITY_SESSION_JOINED = AnalyticEvents.ACTIVITY_SESSION_JOINED;
|
|
object2 = {channel_id: embeddedActivityLocationChannelId,
|
|
guild_id: embeddedActivityLocationGuildId,
|
|
media_session_id: r19[0], activity_session_id: compositeInstanceId,
|
|
application_id: applicationId};
|
|
locations = value9 == r24 ? undefined : r24.locations;
|
|
object2.location_stack = locations;
|
|
object2.user_premium_tier = currentUser.premiumType;
|
|
object2.raw_thermal_state = rawThermalState;
|
|
r25 = value9 != channel ? ChannelRTCStore.getUserParticipantCount(channel.id) : value9;
|
|
object2.n_participants = r25;
|
|
object2.is_activity_start = isStart;
|
|
object2.release_phase = releasePhase;
|
|
shelf_rank = value9 == value19 || value9 == value19.activity ? undefined : value19.activity.shelf_rank;
|
|
object2.shelf_rank = shelf_rank;
|
|
value24 = value20 > 0;
|
|
r25 = value24 ? value20 : value9;
|
|
object2.shelf_sorted_rank = r25;
|
|
object2.activity_user_session_id = value14;
|
|
type = value9 == channel ? undefined : channel.type;
|
|
object2.channel_type = type;
|
|
object2.source = value9 == r24 ? undefined : r24.source;
|
|
r25 = value9 != channel ? (require(7866) /* metro dependency 7866: CommandPermissionContext */).computeCommandContextType(channel,
|
|
|
|
|
|
|
|
|
|
|
|
applicationId) : value9;
|
|
object2.command_context_type = r25;
|
|
object2.invite_inviter_id = inviterUserId;
|
|
object2.interaction_id = value9 == r24 ? undefined : r24.interactionId;
|
|
kind = location.kind;
|
|
object2.embedded_activity_location_kind = kind;
|
|
Reflect.apply(track, defaultImport4, [ACTIVITY_SESSION_JOINED, object2]);
|
|
defaultImport5 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
track = defaultImport5.track;
|
|
ACTIVITY_IFRAME_MOUNT = AnalyticEvents.ACTIVITY_IFRAME_MOUNT;
|
|
locations = value9 == r24 ? undefined : r24.locations;
|
|
type = value9 == channel ? undefined : channel.type;
|
|
launchId = embeddedActivity.launchId;
|
|
shelf_rank = value9 == value19 || value9 == value19.activity ? undefined : value19.activity.shelf_rank;
|
|
kind = location.kind;
|
|
Reflect.apply(track, defaultImport5, [ACTIVITY_IFRAME_MOUNT, {location_stack: locations,
|
|
channel_id: embeddedActivityLocationChannelId, channel_type: type,
|
|
guild_id: embeddedActivityLocationGuildId,
|
|
application_id: applicationId, instance_id: launchId, initial_media_session_id: r19[0],
|
|
activity_user_session_id: value14, raw_thermal_state: rawThermalState,
|
|
is_activity_start: isStart,
|
|
shelf_rank: shelf_rank, shelf_sorted_rank: value24 ? value20 : value9,
|
|
activities_infra_version: r11,
|
|
embedded_activity_location_kind: kind}]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun64908(a0) { // fn#64908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:6439, offset: 0x01bb8f2d, size: 91 bytes, params: 2, frame: 16
|
|
const closure = EmbeddedActivitiesManager;
|
|
env0_7(closure, a0);
|
|
return env0_4(closure, [{key: '_initialize', value: value_64935}, {key: '_terminate', value: value_64936}]);
|
|
}
|
|
|
|
function trackFrameSessionStart(a0) { // fn#64937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:15042, offset: 0x01bba1dd, size: 910 bytes, params: 2, frame: 38
|
|
var r20;
|
|
var r15;
|
|
var locations;
|
|
var r25;
|
|
var shelf_rank;
|
|
var type;
|
|
var isStart;
|
|
var inviterUserId;
|
|
var channelId;
|
|
var guildId;
|
|
var locationKind;
|
|
var launchId;
|
|
var compositeInstanceId;
|
|
var activitiesInfraVersion;
|
|
var currentUser;
|
|
var mediaSessionId;
|
|
var object2;
|
|
var value8;
|
|
var binding;
|
|
var shelfActivities;
|
|
var shelfOrder;
|
|
var value10;
|
|
var value11;
|
|
var releasePhase;
|
|
var rawThermalState;
|
|
var property;
|
|
var defaultImport3;
|
|
var track;
|
|
var ACTIVITY_SESSION_JOINED;
|
|
var value14;
|
|
var defaultImport4;
|
|
var ACTIVITY_IFRAME_MOUNT;
|
|
const env0_0 = a0;
|
|
const value2 = undefined;
|
|
const value3 = (require(8101) /* metro dependency 8101: pendingFrameLaunch */).consumePendingFrameLaunch(a0);
|
|
const value4 = null;
|
|
if (value4 != value3) {
|
|
isStart = value3.isStart;
|
|
inviterUserId = value3.inviterUserId;
|
|
channelId = value3.channelId;
|
|
guildId = value3.guildId;
|
|
locationKind = value3.locationKind;
|
|
launchId = value3.launchId;
|
|
compositeInstanceId = value3.compositeInstanceId;
|
|
activitiesInfraVersion = value3.activitiesInfraVersion;
|
|
currentUser = UserStore.getCurrentUser();
|
|
if (value4 != currentUser) {
|
|
r20 = value4 != channelId ? ChannelStore.getChannel(channelId) : value4;
|
|
mediaSessionId = RTCConnectionStore.getMediaSessionId();
|
|
r15 = value4 != mediaSessionId ? [mediaSessionId] : [];
|
|
value8 = (require(491) /* metro dependency 491 */).v4();
|
|
binding = env0_23;
|
|
object2 = {activitySessionId: compositeInstanceId, activityUserSessionId: value8, launchId: launchId,
|
|
mediaSessionIds: r15, activitiesInfraVersion: activitiesInfraVersion};
|
|
object2.connectedSince = global.Date.now();
|
|
object2.frameChannelId = channelId;
|
|
object2.frameGuildId = guildId;
|
|
object2.frameLocationKind = locationKind;
|
|
binding[a0] = object2;
|
|
shelfActivities = EmbeddedActivitiesStore.getShelfActivities(guildId);
|
|
shelfOrder = ActivityShelfStore.getState().shelfOrder;
|
|
value10 = (importDefault(8099) /* metro dependency 8099: getShelfItemData */)({applicationId: a0,
|
|
activityConfigs: shelfActivities});
|
|
value11 = 1 + shelfOrder.findIndex(_fun64938);
|
|
releasePhase = getShelfItemTrackingProperties(value10).releasePhase;
|
|
rawThermalState = (importDefault(8093) /* metro dependency 8093: ThermalUtilsNative */).getRawThermalState();
|
|
property = env0_24[a0];
|
|
defaultImport3 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
track = defaultImport3.track;
|
|
ACTIVITY_SESSION_JOINED = AnalyticEvents.ACTIVITY_SESSION_JOINED;
|
|
object2 = {channel_id: channelId, guild_id: guildId, media_session_id: r15[0],
|
|
activity_session_id: compositeInstanceId, application_id: a0};
|
|
locations = value4 == property ? value2 : property.locations;
|
|
object2.location_stack = locations;
|
|
object2.user_premium_tier = currentUser.premiumType;
|
|
object2.raw_thermal_state = rawThermalState;
|
|
r25 = value4 != r20 ? ChannelRTCStore.getUserParticipantCount(r20.id) : value4;
|
|
object2.n_participants = r25;
|
|
object2.is_activity_start = isStart;
|
|
object2.release_phase = releasePhase;
|
|
shelf_rank = value4 == value10 || value4 == value10.activity ? value2 : value10.activity.shelf_rank;
|
|
object2.shelf_rank = shelf_rank;
|
|
value14 = value11 > 0;
|
|
r25 = value14 ? value11 : value4;
|
|
object2.shelf_sorted_rank = r25;
|
|
object2.activity_user_session_id = value8;
|
|
type = value4 == r20 ? value2 : r20.type;
|
|
object2.channel_type = type;
|
|
object2.source = value4 == property ? value2 : property.source;
|
|
r25 = value4 != r20 ? (require(7866) /* metro dependency 7866: CommandPermissionContext */).computeCommandContextType(r20,
|
|
|
|
|
|
a0) : value4;
|
|
object2.command_context_type = r25;
|
|
object2.invite_inviter_id = inviterUserId;
|
|
object2.interaction_id = value4 == property ? value2 : property.interactionId;
|
|
object2.embedded_activity_location_kind = locationKind;
|
|
Reflect.apply(track, defaultImport3, [ACTIVITY_SESSION_JOINED, object2]);
|
|
defaultImport4 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
track = defaultImport4.track;
|
|
ACTIVITY_IFRAME_MOUNT = AnalyticEvents.ACTIVITY_IFRAME_MOUNT;
|
|
locations = value4 == property ? value2 : property.locations;
|
|
type = value4 == r20 ? value2 : r20.type;
|
|
shelf_rank = value4 == value10 || value4 == value10.activity ? value2 : value10.activity.shelf_rank;
|
|
Reflect.apply(track, defaultImport4, [ACTIVITY_IFRAME_MOUNT, {location_stack: locations,
|
|
channel_id: channelId,
|
|
channel_type: type, guild_id: guildId, application_id: a0, instance_id: launchId,
|
|
initial_media_session_id: r15[0], activity_user_session_id: value8, raw_thermal_state: rawThermalState,
|
|
is_activity_start: isStart, shelf_rank: shelf_rank, shelf_sorted_rank: value14 ? value11 : value4,
|
|
activities_infra_version: activitiesInfraVersion, embedded_activity_location_kind: locationKind}]);
|
|
}
|
|
}
|
|
return value2;
|
|
}
|
|
|
|
function trackFrameSessionEnd(a0) { // fn#64940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:17020, offset: 0x01bba56b, size: 576 bytes, params: 2, frame: 29
|
|
var r12;
|
|
var r10;
|
|
var r15;
|
|
var r7;
|
|
var frameChannelId;
|
|
var frameGuildId;
|
|
var shelfActivities;
|
|
var value6;
|
|
var object2;
|
|
var value7;
|
|
var releasePhase;
|
|
var rawThermalState;
|
|
var defaultImport3;
|
|
var track;
|
|
var ACTIVITY_SESSION_LEFT;
|
|
var mediaSessionIds;
|
|
var activityUserSessionId;
|
|
var frameLocationKind;
|
|
var defaultImport4;
|
|
var ACTIVITY_IFRAME_UNMOUNT;
|
|
const property = env0_23[a0];
|
|
const currentUser = UserStore.getCurrentUser();
|
|
const value3 = null;
|
|
if (value3 != property) {
|
|
if (value3 != currentUser) {
|
|
frameChannelId = property.frameChannelId;
|
|
r12 = value3 != frameChannelId ? frameChannelId : value3;
|
|
frameGuildId = property.frameGuildId;
|
|
r10 = value3 != frameGuildId ? frameGuildId : value3;
|
|
r15 = value3 != r12 ? ChannelStore.getChannel(r12) : value3;
|
|
shelfActivities = EmbeddedActivitiesStore.getShelfActivities(r10);
|
|
value6 = undefined;
|
|
value7 = (importDefault(8099) /* metro dependency 8099: getShelfItemData */)({applicationId: a0,
|
|
activityConfigs: shelfActivities});
|
|
releasePhase = getShelfItemTrackingProperties(value7).releasePhase;
|
|
rawThermalState = (importDefault(8093) /* metro dependency 8093: ThermalUtilsNative */).getRawThermalState();
|
|
r7 = value3 != property.connectedSince ? global.Date.now() - property.connectedSince : value3;
|
|
defaultImport3 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
track = defaultImport3.track;
|
|
ACTIVITY_SESSION_LEFT = AnalyticEvents.ACTIVITY_SESSION_LEFT;
|
|
object2 = {channel_id: r12, guild_id: r10};
|
|
mediaSessionIds = property.mediaSessionIds;
|
|
object2.media_session_id = mediaSessionIds[0];
|
|
object2.activity_session_id = property.activitySessionId;
|
|
object2.application_id = a0;
|
|
object2.duration_ms = r7;
|
|
object2.user_premium_tier = currentUser.premiumType;
|
|
object2.raw_thermal_state = rawThermalState;
|
|
object2.release_phase = releasePhase;
|
|
object2.shelf_rank = value3 == value7 || value3 == value7.activity ? value6 : value7.activity.shelf_rank;
|
|
activityUserSessionId = property.activityUserSessionId;
|
|
object2.activity_user_session_id = activityUserSessionId;
|
|
object2.channel_type = value3 == r15 ? value6 : r15.type;
|
|
mediaSessionIds = property.mediaSessionIds;
|
|
object2.media_session_ids = mediaSessionIds;
|
|
frameLocationKind = property.frameLocationKind;
|
|
object2.embedded_activity_location_kind = frameLocationKind;
|
|
Reflect.apply(track, defaultImport3, [ACTIVITY_SESSION_LEFT, object2]);
|
|
defaultImport4 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
track = defaultImport4.track;
|
|
ACTIVITY_IFRAME_UNMOUNT = AnalyticEvents.ACTIVITY_IFRAME_UNMOUNT;
|
|
mediaSessionIds = property.mediaSessionIds;
|
|
activityUserSessionId = property.activityUserSessionId;
|
|
frameLocationKind = property.frameLocationKind;
|
|
Reflect.apply(track, defaultImport4, [ACTIVITY_IFRAME_UNMOUNT, {channel_id: r12, guild_id: r10,
|
|
application_id: a0,
|
|
instance_ids: value3 != property.launchId ? [property.launchId] : value6,
|
|
media_session_ids: mediaSessionIds,
|
|
activity_user_session_id: activityUserSessionId, raw_thermal_state: rawThermalState, duration_ms: r7,
|
|
embedded_activity_location_kind: frameLocationKind}]);
|
|
delete env0_23[a0];
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun64899() { // fn#64899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:2009, offset: 0x01bb8603, size: 28 bytes, params: 1, frame: 13
|
|
return clearAwaitingAnalyticsContextImmediate(env0_0, require);
|
|
}
|
|
|
|
async function _fun64904({applicationId, location, instanceId}) { // fn#64904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:2390, offset: 0x01bb86ac, size: 743 bytes, params: 2, frame: 34
|
|
var HTTP;
|
|
var post;
|
|
var object2;
|
|
var property;
|
|
var binding2;
|
|
var embeddedActivityLocationChannelId;
|
|
var embeddedActivityLocationGuildId;
|
|
var channel;
|
|
var currentUser;
|
|
var shelfActivities;
|
|
var binding3;
|
|
var value20;
|
|
var releasePhase;
|
|
var rawThermalState;
|
|
var value23;
|
|
var track;
|
|
var ACTIVITY_SESSION_LEFT;
|
|
var mediaSessionIds;
|
|
var activityUserSessionId;
|
|
var kind;
|
|
var value24;
|
|
var ACTIVITY_IFRAME_UNMOUNT;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = undefined;
|
|
await value;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
let binding = env2_17;
|
|
const embeddedActivityDurationMs = binding.getEmbeddedActivityDurationMs(location.id, applicationId);
|
|
const sessionId = env2_11.getSessionId();
|
|
if (instanceId != null && sessionId != null) {
|
|
binding = env2_0;
|
|
HTTP = binding(env2_2[18]).HTTP;
|
|
post = HTTP.post;
|
|
binding = env2_20;
|
|
await Reflect.apply(post, HTTP, [{url: binding.ACTIVITY_LEAVE(applicationId, location.id, instanceId),
|
|
body: {session_id: sessionId}, retries: 2, rejectWithError: false}]);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
property = env2_23[applicationId];
|
|
binding = env2_0;
|
|
binding2 = env2_2;
|
|
embeddedActivityLocationChannelId = binding(binding2[19]).getEmbeddedActivityLocationChannelId(location);
|
|
embeddedActivityLocationGuildId = binding(binding2[19]).getEmbeddedActivityLocationGuildId(location);
|
|
binding = env2_12;
|
|
channel = binding.getChannel(embeddedActivityLocationChannelId);
|
|
binding = env2_15;
|
|
currentUser = binding.getCurrentUser();
|
|
} else {
|
|
property = env2_23[applicationId];
|
|
binding = env2_0;
|
|
binding2 = env2_2;
|
|
embeddedActivityLocationChannelId = binding(binding2[19]).getEmbeddedActivityLocationChannelId(location);
|
|
embeddedActivityLocationGuildId = binding(binding2[19]).getEmbeddedActivityLocationGuildId(location);
|
|
channel = env2_12.getChannel(embeddedActivityLocationChannelId);
|
|
currentUser = env2_15.getCurrentUser();
|
|
}
|
|
if (property != null) {
|
|
if (currentUser != null) {
|
|
if (property.connectedSince == null) {
|
|
binding = env2_17;
|
|
shelfActivities = binding.getShelfActivities(embeddedActivityLocationGuildId);
|
|
binding = env2_1;
|
|
binding3 = env2_2;
|
|
value20 = binding(binding3[20])({applicationId: applicationId, activityConfigs: shelfActivities});
|
|
releasePhase = env2_30(value20).releasePhase;
|
|
rawThermalState = binding(binding3[21]).getRawThermalState();
|
|
value23 = binding(binding3[22]);
|
|
track = value23.track;
|
|
ACTIVITY_SESSION_LEFT = env2_18.ACTIVITY_SESSION_LEFT;
|
|
object2 = {channel_id: embeddedActivityLocationChannelId, guild_id: embeddedActivityLocationGuildId};
|
|
mediaSessionIds = property.mediaSessionIds;
|
|
object2.media_session_id = mediaSessionIds[0];
|
|
object2.activity_session_id = property.activitySessionId;
|
|
object2.application_id = applicationId;
|
|
object2.duration_ms = embeddedActivityDurationMs;
|
|
object2.user_premium_tier = currentUser.premiumType;
|
|
object2.raw_thermal_state = rawThermalState;
|
|
object2.release_phase = releasePhase;
|
|
object2.shelf_rank = value20 == null || value20.activity == null ? value : value20.activity.shelf_rank;
|
|
activityUserSessionId = property.activityUserSessionId;
|
|
object2.activity_user_session_id = activityUserSessionId;
|
|
object2.channel_type = channel == null ? value : channel.type;
|
|
mediaSessionIds = property.mediaSessionIds;
|
|
object2.media_session_ids = mediaSessionIds;
|
|
kind = location.kind;
|
|
object2.embedded_activity_location_kind = kind;
|
|
Reflect.apply(track, value23, [ACTIVITY_SESSION_LEFT, object2]);
|
|
binding = env2_1;
|
|
value24 = binding(env2_2[22]);
|
|
track = value24.track;
|
|
ACTIVITY_IFRAME_UNMOUNT = env2_18.ACTIVITY_IFRAME_UNMOUNT;
|
|
mediaSessionIds = property.mediaSessionIds;
|
|
activityUserSessionId = property.activityUserSessionId;
|
|
kind = location.kind;
|
|
Reflect.apply(track, value24, [ACTIVITY_IFRAME_UNMOUNT, {channel_id: embeddedActivityLocationChannelId,
|
|
guild_id: embeddedActivityLocationGuildId, application_id: applicationId,
|
|
instance_ids: property.launchId != null ? [property.launchId] : value,
|
|
media_session_ids: mediaSessionIds,
|
|
activity_user_session_id: activityUserSessionId, raw_thermal_state: rawThermalState,
|
|
duration_ms: embeddedActivityDurationMs, embedded_activity_location_kind: kind}]);
|
|
delete env2_23[applicationId];
|
|
}
|
|
}
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function _fun64906({userId}) { // fn#64906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:4390, offset: 0x01bb8f18, size: 21 bytes, params: 2, frame: 2
|
|
return userId === env0_1;
|
|
}
|
|
|
|
function EmbeddedActivitiesManager(a0) { // fn#64909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:6451, offset: 0x01bb8f88, size: 316 bytes, params: 2, frame: 20
|
|
var r0;
|
|
var Reflect;
|
|
let value = copyRestArgs(0, undefined);
|
|
let binding = env1_3;
|
|
binding(this, EmbeddedActivitiesManager);
|
|
const items2 = [];
|
|
arraySpread(items2, value, 0, items2);
|
|
value = env1_6(EmbeddedActivitiesManager);
|
|
binding = env1_5;
|
|
if (_isNativeReflectConstruct_64892()) {
|
|
Reflect = global.Reflect;
|
|
value = Reflect.construct(value, items2, env1_6(this).constructor);
|
|
r0 = value;
|
|
} else {
|
|
value = value.apply(this, items2);
|
|
r0 = value;
|
|
}
|
|
value = binding(this, r0);
|
|
value.handleSelectedChannelUpdate = handleSelectedChannelUpdate;
|
|
value.handleActivityWebViewRelease = handleActivityWebViewRelease;
|
|
value.handleActivityLaunchSuccess = handleActivityLaunchSuccess;
|
|
value.handleActivityLaunchFail = _fun64914();
|
|
value.handleActivityLaunchCancel = function({nonce, applicationId}) {
|
|
clearAwaitingAnalyticsContextImmediate(applicationId, nonce);
|
|
};
|
|
value.superHandleRPCDisconnect = superHandleRPCDisconnect;
|
|
value.handleCallDelete = handleCallDelete;
|
|
value.handleRTCConnectionState = handleRTCConnectionState;
|
|
value.handleCallEnded = handleCallEnded;
|
|
value.handleDeferredOpen = _fun64923();
|
|
value.handleGuildDelete = handleGuildDelete_64928;
|
|
value.handleChannelDelete = handleChannelDelete_64930;
|
|
value.handleInteractionQueue = handleInteractionQueue;
|
|
value.handleInteractionCreate = handleInteractionCreate;
|
|
value.handleInteractionSuccess = handleInteractionSuccess;
|
|
value.handleInteractionFailure = handleInteractionFailure_64934;
|
|
return value;
|
|
}
|
|
|
|
function value_64935() { // fn#64935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:12171, offset: 0x01bb9d35, size: 596 bytes, params: 1, frame: 20
|
|
let value = environment.__proto__;
|
|
SelectedChannelStore.addChangeListener(this.handleSelectedChannelUpdate);
|
|
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
|
let subscribe = ComponentDispatch.subscribe;
|
|
const RELEASE_ACTIVITY_WEB_VIEW = ComponentActions.RELEASE_ACTIVITY_WEB_VIEW;
|
|
Reflect.apply(subscribe, ComponentDispatch, [RELEASE_ACTIVITY_WEB_VIEW, this.handleActivityWebViewRelease]);
|
|
subscribe = ComponentDispatch.subscribe;
|
|
const OPEN_EMBEDDED_ACTIVITY = ComponentActions.OPEN_EMBEDDED_ACTIVITY;
|
|
Reflect.apply(subscribe, ComponentDispatch, [OPEN_EMBEDDED_ACTIVITY, handleOpenEmbeddedActivity]);
|
|
const defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
defaultImport.subscribe('EMBEDDED_ACTIVITY_LAUNCH_START', handleActivityLaunchStart);
|
|
const defaultImport2 = defaultImport;
|
|
defaultImport2.subscribe('EMBEDDED_ACTIVITY_LAUNCH_SUCCESS', this.handleActivityLaunchSuccess);
|
|
const defaultImport3 = defaultImport;
|
|
defaultImport3.subscribe('EMBEDDED_ACTIVITY_LAUNCH_FAIL', this.handleActivityLaunchFail);
|
|
const defaultImport4 = defaultImport;
|
|
defaultImport4.subscribe('EMBEDDED_ACTIVITY_LAUNCH_CANCEL', this.handleActivityLaunchCancel);
|
|
const defaultImport5 = defaultImport;
|
|
defaultImport5.subscribe('EMBEDDED_ACTIVITY_CLOSE', handleActivityClose);
|
|
value = defaultImport;
|
|
value.subscribe('EMBEDDED_ACTIVITY_DEFERRED_OPEN', this.handleDeferredOpen);
|
|
value = defaultImport;
|
|
value.subscribe('RPC_APP_DISCONNECTED', this.handleRPCDisconnect);
|
|
value = defaultImport;
|
|
value.subscribe('CALL_DELETE', this.handleCallDelete);
|
|
value = defaultImport;
|
|
value.subscribe('RTC_CONNECTION_STATE', this.handleRTCConnectionState);
|
|
value = defaultImport;
|
|
value.subscribe('GUILD_DELETE', this.handleGuildDelete);
|
|
value = defaultImport;
|
|
value.subscribe('CHANNEL_DELETE', this.handleChannelDelete);
|
|
value = defaultImport;
|
|
value.subscribe('INTERACTION_QUEUE', this.handleInteractionQueue);
|
|
value = defaultImport;
|
|
value.subscribe('INTERACTION_CREATE', this.handleInteractionCreate);
|
|
value = defaultImport;
|
|
value.subscribe('INTERACTION_SUCCESS', this.handleInteractionSuccess);
|
|
value = defaultImport;
|
|
value.subscribe('INTERACTION_FAILURE', this.handleInteractionFailure);
|
|
}
|
|
|
|
function value_64936() { // fn#64936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:13532, offset: 0x01bb9f89, size: 596 bytes, params: 1, frame: 20
|
|
let value = environment.__proto__;
|
|
SelectedChannelStore.removeChangeListener(this.handleSelectedChannelUpdate);
|
|
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
|
let unsubscribe = ComponentDispatch.unsubscribe;
|
|
const RELEASE_ACTIVITY_WEB_VIEW = ComponentActions.RELEASE_ACTIVITY_WEB_VIEW;
|
|
Reflect.apply(unsubscribe, ComponentDispatch, [RELEASE_ACTIVITY_WEB_VIEW, this.handleActivityWebViewRelease]);
|
|
unsubscribe = ComponentDispatch.unsubscribe;
|
|
const OPEN_EMBEDDED_ACTIVITY = ComponentActions.OPEN_EMBEDDED_ACTIVITY;
|
|
Reflect.apply(unsubscribe, ComponentDispatch, [OPEN_EMBEDDED_ACTIVITY, handleOpenEmbeddedActivity]);
|
|
const defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
defaultImport.unsubscribe('EMBEDDED_ACTIVITY_LAUNCH_START', handleActivityLaunchStart);
|
|
const defaultImport2 = defaultImport;
|
|
defaultImport2.unsubscribe('EMBEDDED_ACTIVITY_LAUNCH_SUCCESS', this.handleActivityLaunchSuccess);
|
|
const defaultImport3 = defaultImport;
|
|
defaultImport3.unsubscribe('EMBEDDED_ACTIVITY_LAUNCH_FAIL', this.handleActivityLaunchFail);
|
|
const defaultImport4 = defaultImport;
|
|
defaultImport4.unsubscribe('EMBEDDED_ACTIVITY_LAUNCH_CANCEL', this.handleActivityLaunchCancel);
|
|
const defaultImport5 = defaultImport;
|
|
defaultImport5.unsubscribe('EMBEDDED_ACTIVITY_CLOSE', handleActivityClose);
|
|
value = defaultImport;
|
|
value.unsubscribe('EMBEDDED_ACTIVITY_DEFERRED_OPEN', this.handleDeferredOpen);
|
|
value = defaultImport;
|
|
value.unsubscribe('RPC_APP_DISCONNECTED', this.handleRPCDisconnect);
|
|
value = defaultImport;
|
|
value.unsubscribe('CALL_DELETE', this.handleCallDelete);
|
|
value = defaultImport;
|
|
value.unsubscribe('RTC_CONNECTION_STATE', this.handleRTCConnectionState);
|
|
value = defaultImport;
|
|
value.unsubscribe('GUILD_DELETE', this.handleGuildDelete);
|
|
value = defaultImport;
|
|
value.unsubscribe('CHANNEL_DELETE', this.handleChannelDelete);
|
|
value = defaultImport;
|
|
value.unsubscribe('INTERACTION_QUEUE', this.handleInteractionQueue);
|
|
value = defaultImport;
|
|
value.unsubscribe('INTERACTION_CREATE', this.handleInteractionCreate);
|
|
value = defaultImport;
|
|
value.unsubscribe('INTERACTION_SUCCESS', this.handleInteractionSuccess);
|
|
value = defaultImport;
|
|
value.unsubscribe('INTERACTION_FAILURE', this.handleInteractionFailure);
|
|
}
|
|
|
|
function handleSelectedChannelUpdate() { // fn#64910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:6742, owner: EmbeddedActivitiesManager.handleSelectedChannelUpdate, offset: 0x01bb90c4, size: 271 bytes, params: 1, frame: 24
|
|
var r6;
|
|
var r5;
|
|
var value9;
|
|
var location;
|
|
var applicationId;
|
|
var moduleValue;
|
|
var embeddedActivityLocationChannelId;
|
|
var value11;
|
|
var value12;
|
|
var value13;
|
|
var binding;
|
|
var value14;
|
|
var embeddedActivitiesForChannel;
|
|
const voiceChannelId = SelectedChannelStore.getVoiceChannelId();
|
|
const _createForOfIteratorHelperLoose_64889Binding = _createForOfIteratorHelperLoose_64889;
|
|
const value4 = EmbeddedActivitiesStore.getSelfEmbeddedActivities().values();
|
|
const value5 = undefined;
|
|
const value6 = _createForOfIteratorHelperLoose_64889Binding(value4);
|
|
const value7 = value6();
|
|
let done = value7.done;
|
|
if (!done) {
|
|
r6 = value7;
|
|
while (true) {
|
|
value9 = r6.value;
|
|
location = value9.location;
|
|
applicationId = value9.applicationId;
|
|
moduleValue = require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */;
|
|
embeddedActivityLocationChannelId = moduleValue.getEmbeddedActivityLocationChannelId(location);
|
|
value11 = embeddedActivityLocationChannelId != null;
|
|
if (value11) {
|
|
value12 = (importDefault(8102) /* metro dependency 8102: isVoiceEmbeddedActivity */)(embeddedActivityLocationChannelId);
|
|
r5 = value12;
|
|
} else {
|
|
r5 = value11;
|
|
}
|
|
if (!r5) {
|
|
continue;
|
|
}
|
|
value13 = embeddedActivityLocationChannelId !== voiceChannelId;
|
|
r5 = value13;
|
|
if (!r5) {
|
|
continue;
|
|
}
|
|
binding = env0_0;
|
|
binding.leaveActivity({location: location, applicationId: applicationId});
|
|
value14 = value6();
|
|
done = value14.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r6 = value14;
|
|
continue;
|
|
}
|
|
}
|
|
if (voiceChannelId != null) {
|
|
embeddedActivitiesForChannel = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel(voiceChannelId);
|
|
var env0_0 = AuthenticationStore.getId();
|
|
embeddedActivitiesForChannel.forEach(_fun64911);
|
|
}
|
|
env2_26 = voiceChannelId ?? value5;
|
|
return value5;
|
|
}
|
|
|
|
function handleActivityWebViewRelease() { // fn#64912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:7461, owner: EmbeddedActivitiesManager.handleActivityWebViewRelease, offset: 0x01bb928d, size: 21 bytes, params: 1, frame: 9
|
|
env0_0.releaseWebView();
|
|
}
|
|
|
|
function handleActivityLaunchSuccess({nonce, applicationId}) { // fn#64913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:7516, owner: EmbeddedActivitiesManager.handleActivityLaunchSuccess, offset: 0x01bb92a2, size: 83 bytes, params: 2, frame: 14
|
|
let value = environment.__proto__.__proto__;
|
|
clearAwaitingAnalyticsContextAsync(applicationId, nonce);
|
|
value = require(8067) /* metro dependency 8067: getURLForApplication */;
|
|
if (value.isUsingDevShelfActivityUrlOverride()) {
|
|
env0_0.showDevShelfOverrideEnabled();
|
|
}
|
|
}
|
|
|
|
function _fun64914() { // fn#64914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:7694, offset: 0x01bb92f5, size: 32 bytes, params: 1, frame: 12
|
|
const env0_0 = env2_8(_fun64916);
|
|
return _fun64917;
|
|
}
|
|
|
|
function superHandleRPCDisconnect({reason, application}) { // fn#64919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:8564, owner: EmbeddedActivitiesManager.superHandleRPCDisconnect, offset: 0x01bb94c6, size: 255 bytes, params: 2, frame: 20
|
|
var r5;
|
|
var value;
|
|
var value4;
|
|
var value5;
|
|
var done;
|
|
var value7;
|
|
var applicationId;
|
|
var location;
|
|
var binding;
|
|
var value8;
|
|
var defaultImport;
|
|
const id = application.id;
|
|
if (id != null) {
|
|
if (reason != null) {
|
|
value = environment.__proto__.__proto__;
|
|
value4 = _createForOfIteratorHelperLoose_64889(EmbeddedActivitiesStore.getSelfEmbeddedActivities().values());
|
|
value5 = value4();
|
|
done = value5.done;
|
|
if (!done) {
|
|
r5 = value5;
|
|
while (true) {
|
|
value7 = r5.value;
|
|
applicationId = value7.applicationId;
|
|
location = value7.location;
|
|
if (applicationId === id) {
|
|
binding = env0_0;
|
|
binding.leaveActivity({location: location, applicationId: id});
|
|
}
|
|
value8 = value4();
|
|
done = value8.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r5 = value8;
|
|
continue;
|
|
}
|
|
}
|
|
if (reason.code !== RPCCloseCodes.CLOSE_NORMAL) {
|
|
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
defaultImport.track(AnalyticEvents.ACTIVITY_CLOSED_RPC_ERROR, {rpc_close_code: reason.code,
|
|
rpc_message: reason.message, application_id: id});
|
|
env0_0.showErrorModal(reason, id);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function EmbeddedActivitiesManagerHandleCallDelete({channelId}) { // fn#64920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:9000, owner: EmbeddedActivitiesManager.handleCallDelete, offset: 0x01bb95c5, size: 63 bytes, params: 2, frame: 12
|
|
let value = environment.__proto__.__proto__;
|
|
value = SelectedChannelStore.getVoiceChannelId();
|
|
if (value != null && value === channelId) {
|
|
env0_0.handleCallEnded(channelId);
|
|
}
|
|
}
|
|
|
|
function handleRTCConnectionState(a0) { // fn#64921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:9111, owner: EmbeddedActivitiesManager.handleRTCConnectionState, offset: 0x01bb9604, size: 52 bytes, params: 2, frame: 11
|
|
const state = a0.state;
|
|
const DISCONNECTED = RTCConnectionStates.DISCONNECTED;
|
|
if (state === DISCONNECTED) {
|
|
env0_0.handleCallEnded(a0.channelId);
|
|
}
|
|
}
|
|
|
|
function handleCallEnded(a0) { // fn#64922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:9203, owner: EmbeddedActivitiesManager.handleCallEnded, offset: 0x01bb9638, size: 69 bytes, params: 2, frame: 13
|
|
let value = environment.__proto__.__proto__;
|
|
value = EmbeddedActivitiesStore.getSelfEmbeddedActivityForChannel(a0);
|
|
if (value != null) {
|
|
env0_0.leaveActivity({location: value.location, applicationId: value.applicationId});
|
|
}
|
|
}
|
|
|
|
function _fun64923() { // fn#64923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:9352, offset: 0x01bb967d, size: 32 bytes, params: 1, frame: 12
|
|
const env0_0 = env2_8(_fun64925);
|
|
return _fun64927;
|
|
}
|
|
|
|
function EmbeddedActivitiesManagerHandleGuildDelete({guild}) { // fn#64928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:10805, owner: EmbeddedActivitiesManager.handleGuildDelete, offset: 0x01bb9a64, size: 50 bytes, params: 2, frame: 11
|
|
var environment;
|
|
const value = environment.__proto__.__proto__;
|
|
EmbeddedActivitiesStore.getSelfEmbeddedActivities().forEach(_fun64929);
|
|
}
|
|
|
|
function EmbeddedActivitiesManagerHandleChannelDelete({channel}) { // fn#64930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:11031, owner: EmbeddedActivitiesManager.handleChannelDelete, offset: 0x01bb9af5, size: 79 bytes, params: 2, frame: 13
|
|
let value = environment.__proto__.__proto__;
|
|
value = EmbeddedActivitiesStore.getSelfEmbeddedActivityForChannel(channel.id);
|
|
if (value != null) {
|
|
env0_0.leaveActivity({location: value.location, applicationId: value.applicationId});
|
|
}
|
|
}
|
|
|
|
function handleInteractionQueue({nonce, data}) { // fn#64931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:11199, owner: EmbeddedActivitiesManager.handleInteractionQueue, offset: 0x01bb9b44, size: 331 bytes, params: 2, frame: 16
|
|
var r6;
|
|
const InteractionTypes = (require(1909) /* metro dependency 1909: Server */).InteractionTypes;
|
|
var object2;
|
|
var setAwaitingAnalyticsContextBinding;
|
|
if (env2_24[data.applicationId] == null) {
|
|
r6 = data.interactionType === InteractionTypes.APPLICATION_COMMAND ? [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INTERACTION_APPLICATION_COMMAND] : data.interactionType === InteractionTypes.MESSAGE_COMPONENT ? [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INTERACTION_MESSAGE_COMPONENT] : data.interactionType !== InteractionTypes.MODAL_SUBMIT ? undefined : [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INTERACTION_MODAL_SUBMIT];
|
|
setAwaitingAnalyticsContextBinding = setAwaitingAnalyticsContext;
|
|
object2 = {};
|
|
object2.applicationId = data.applicationId;
|
|
object2.nonce = nonce;
|
|
object2.locations = r6;
|
|
if (setAwaitingAnalyticsContextBinding(object2)) {
|
|
env2_25[nonce] = data.applicationId;
|
|
}
|
|
}
|
|
}
|
|
|
|
function handleInteractionCreate({nonce, interactionId}) { // fn#64932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:11707, owner: EmbeddedActivitiesManager.handleInteractionCreate, offset: 0x01bb9c8f, size: 58 bytes, params: 2, frame: 5
|
|
var value;
|
|
var property;
|
|
if (nonce != null) {
|
|
value = environment.__proto__.__proto__;
|
|
property = env2_25[nonce];
|
|
if (property != null) {
|
|
property = env2_24[property];
|
|
if (property != null) {
|
|
property.interactionId = interactionId;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function handleInteractionSuccess({nonce}) { // fn#64933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:11842, owner: EmbeddedActivitiesManager.handleInteractionSuccess, offset: 0x01bb9cc9, size: 54 bytes, params: 2, frame: 13
|
|
var value;
|
|
var property;
|
|
if (nonce != null) {
|
|
value = environment.__proto__.__proto__;
|
|
property = env2_25[nonce];
|
|
if (property != null) {
|
|
delete env2_25[nonce];
|
|
clearAwaitingAnalyticsContextAsync(property, nonce);
|
|
}
|
|
}
|
|
}
|
|
|
|
function EmbeddedActivitiesManagerHandleInteractionFailure({nonce}) { // fn#64934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:11971, owner: EmbeddedActivitiesManager.handleInteractionFailure, offset: 0x01bb9cff, size: 54 bytes, params: 2, frame: 13
|
|
var value;
|
|
var property;
|
|
if (nonce != null) {
|
|
value = environment.__proto__.__proto__;
|
|
property = env2_25[nonce];
|
|
if (property != null) {
|
|
delete env2_25[nonce];
|
|
clearAwaitingAnalyticsContextImmediate(property, nonce);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun64911(a0) { // fn#64911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:7121, offset: 0x01bb91d3, size: 186 bytes, params: 2, frame: 14
|
|
var moduleValue;
|
|
var selfEmbeddedActivityForChannel;
|
|
const userIds = a0.userIds;
|
|
if (userIds.has(env0_0)) {
|
|
value = environment.__proto__.__proto__.__proto__;
|
|
moduleValue = require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */;
|
|
selfEmbeddedActivityForChannel = EmbeddedActivitiesStore.getSelfEmbeddedActivityForChannel(moduleValue.getEmbeddedActivityLocationChannelId(a0.location));
|
|
if (selfEmbeddedActivityForChannel == null) {
|
|
value = environment.__proto__;
|
|
env1_0.leaveActivity({location: a0.location, applicationId: a0.applicationId});
|
|
} else if (env3_26 == null) {
|
|
value = environment.__proto__;
|
|
env1_0.hidePIPEmbed({location: selfEmbeddedActivityForChannel.location,
|
|
applicationId: selfEmbeddedActivityForChannel.applicationId});
|
|
}
|
|
}
|
|
}
|
|
|
|
async function _fun64916({error, nonce, channelId, guildId, applicationId, isStart, locationKind}) { // fn#64916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:7714, offset: 0x01bb9327, size: 384 bytes, params: 2, frame: 27
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = undefined;
|
|
await value;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
const value6 = env4_32(applicationId, nonce);
|
|
let binding = env4_0;
|
|
const value7 = binding(env4_2[32]);
|
|
const getActivityLaunchErrorInfo = value7.getActivityLaunchErrorInfo;
|
|
await Reflect.apply(getActivityLaunchErrorInfo, value7, [error, applicationId]);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
EmbeddedActivitiesManager.showLaunchErrorModal(undefined.message);
|
|
const channel = env4_12.getChannel(channelId);
|
|
binding = env4_1;
|
|
const binding2 = env4_2;
|
|
const rawThermalState = binding(binding2[21]).getRawThermalState();
|
|
const value14 = binding(binding2[22]);
|
|
const track = value14.track;
|
|
const ACTIVITY_SESSION_JOIN_FAILED = env4_18.ACTIVITY_SESSION_JOIN_FAILED;
|
|
const object2 = {channel_id: channelId};
|
|
object2.guild_id = guildId ?? (channel == null ? value : channel.getGuildId());
|
|
object2.application_id = applicationId;
|
|
object2.raw_thermal_state = rawThermalState;
|
|
object2.is_activity_start = isStart;
|
|
object2.channel_type = channel == null ? value : channel.type;
|
|
object2.location_stack = value6 == null ? value : value6.locations;
|
|
object2.error_type = undefined.errorType;
|
|
object2.error_status = undefined.errorStatus;
|
|
object2.error_code = undefined.errorCode;
|
|
object2.source = value6 == null ? value : value6.source;
|
|
object2.embedded_activity_location_kind = locationKind;
|
|
Reflect.apply(track, value14, [ACTIVITY_SESSION_JOIN_FAILED, object2]);
|
|
return value;
|
|
}
|
|
|
|
async function _fun64925({channelId, applicationId, analyticsLocations, commandOrigin, inviterUserId}) { // fn#64925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:9372, offset: 0x01bb96af, size: 949 bytes, params: 2, frame: 29
|
|
var environment;
|
|
var r17;
|
|
var size;
|
|
var selfEmbeddedActivityForChannel;
|
|
var value8;
|
|
var value9;
|
|
var value11;
|
|
var value12;
|
|
var showLaunchErrorModal;
|
|
var binding2;
|
|
var intl;
|
|
var value14;
|
|
var binding3;
|
|
var value16;
|
|
var fetchShelf;
|
|
var value17;
|
|
var activityConfigs;
|
|
var applications;
|
|
var value20;
|
|
var value21;
|
|
var value23;
|
|
var value25;
|
|
var value26;
|
|
var value30;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = undefined;
|
|
await value;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
let binding = env4_12;
|
|
const channel = binding.getChannel(channelId);
|
|
if (value !== channel) {
|
|
if (Reflect.apply(env4_10.has, binding, [channel == null ? value : channel.type])) {
|
|
binding = env4_14;
|
|
if (binding.getVoiceChannelId() !== channelId) {
|
|
return value;
|
|
}
|
|
binding = env4_17;
|
|
selfEmbeddedActivityForChannel = binding.getSelfEmbeddedActivityForChannel(channelId);
|
|
applicationId = selfEmbeddedActivityForChannel == null ? value : selfEmbeddedActivityForChannel.applicationId;
|
|
if (applicationId === applicationId) {
|
|
return value;
|
|
}
|
|
binding = env4_1;
|
|
value8 = binding(env4_2[33]);
|
|
await value8.fetchApplication(applicationId);
|
|
value9 = undefined;
|
|
if (false) {
|
|
return value9;
|
|
}
|
|
binding = env4_0;
|
|
value11 = binding(env4_2[34]);
|
|
if (value11.getIsActivitiesEnabledForCurrentPlatform()) {
|
|
binding = env4_1;
|
|
if (binding(env4_2[36])(value9 == null || value9.embedded_activity_config == null ? value : value9.embedded_activity_config.supported_platforms)) {
|
|
r17 = (channel == null ? value : channel.getGuildId()) ?? value;
|
|
binding = env4_0;
|
|
value16 = binding(env4_2[37]);
|
|
fetchShelf = value16.fetchShelf;
|
|
await Reflect.apply(fetchShelf, value16, [{guildId: r17}]);
|
|
value17 = undefined;
|
|
if (false) {
|
|
return value17;
|
|
}
|
|
activityConfigs = value17.activityConfigs;
|
|
applications = value17.applications;
|
|
binding = env4_1;
|
|
if (binding(env4_2[20])({applicationId: applicationId, activityConfigs: activityConfigs,
|
|
applications: applications}) != null) {
|
|
binding = env4_17;
|
|
value25 = binding.getEmbeddedActivitiesForChannel(channelId).find(function({applicationId}) {
|
|
return applicationId === applicationId;
|
|
});
|
|
size = value25 == null ? value : value25.userIds.size;
|
|
value26 = 0;
|
|
if ((size ?? value26) > value26) {
|
|
value30 = env4_0(env4_2[38]);
|
|
await value30.maybeJoinEmbeddedActivity({channelId: channelId, applicationId: applicationId,
|
|
launchId: value25 == null ? value : value25.launchId, inputApplication: null,
|
|
analyticsLocations: analyticsLocations, inviterUserId: inviterUserId});
|
|
return value;
|
|
}
|
|
binding = env4_1;
|
|
await binding(env4_2[39])({targetApplicationId: applicationId, channelId: channelId,
|
|
analyticsLocations: analyticsLocations, commandOrigin: commandOrigin,
|
|
inviterUserId: inviterUserId});
|
|
return value;
|
|
}
|
|
binding = env4_0;
|
|
value20 = binding(env4_2[37]);
|
|
fetchShelf = value20.fetchShelf;
|
|
await Reflect.apply(fetchShelf, value20, [{guildId: r17, force: true}]);
|
|
value21 = undefined;
|
|
if (false) {
|
|
return value21;
|
|
}
|
|
binding = env4_1;
|
|
value23 = binding(env4_2[20]);
|
|
activityConfigs = value21.activityConfigs;
|
|
applications = value21.applications;
|
|
value23({applicationId: applicationId, activityConfigs: activityConfigs,
|
|
applications: applications});
|
|
binding = env4_17;
|
|
value25 = binding.getEmbeddedActivitiesForChannel(channelId).find(_fun64926);
|
|
size = value25 == null ? value : value25.userIds.size;
|
|
value26 = 0;
|
|
if ((size ?? value26) > value26) {
|
|
value30 = env4_0(env4_2[38]);
|
|
await value30.maybeJoinEmbeddedActivity({channelId: channelId, applicationId: applicationId,
|
|
launchId: value25 == null ? value : value25.launchId, inputApplication: null,
|
|
analyticsLocations: analyticsLocations, inviterUserId: inviterUserId});
|
|
return value;
|
|
}
|
|
binding = env4_1;
|
|
await binding(env4_2[39])({targetApplicationId: applicationId, channelId: channelId,
|
|
analyticsLocations: analyticsLocations, commandOrigin: commandOrigin,
|
|
inviterUserId: inviterUserId});
|
|
return value;
|
|
}
|
|
value14 = environment.__proto__.__proto__;
|
|
showLaunchErrorModal = EmbeddedActivitiesManager.showLaunchErrorModal;
|
|
binding = env4_0;
|
|
binding3 = env4_2;
|
|
intl = binding(binding3[35]).intl;
|
|
Reflect.apply(showLaunchErrorModal, EmbeddedActivitiesManager,
|
|
[intl.string(binding(binding3[35]).t.uGDCcw)]);
|
|
return value;
|
|
}
|
|
value12 = environment.__proto__.__proto__;
|
|
showLaunchErrorModal = EmbeddedActivitiesManager.showLaunchErrorModal;
|
|
binding = env4_0;
|
|
binding2 = env4_2;
|
|
intl = binding(binding2[35]).intl;
|
|
Reflect.apply(showLaunchErrorModal, EmbeddedActivitiesManager,
|
|
[intl.string(binding(binding2[35]).t.UXoQTp)]);
|
|
return value;
|
|
}
|
|
selfEmbeddedActivityForChannel = env4_17.getSelfEmbeddedActivityForChannel(channelId);
|
|
applicationId = selfEmbeddedActivityForChannel == null ? value : selfEmbeddedActivityForChannel.applicationId;
|
|
if (applicationId === applicationId) {
|
|
return value;
|
|
}
|
|
value8 = env4_1(env4_2[33]);
|
|
await value8.fetchApplication(applicationId);
|
|
value9 = undefined;
|
|
if (false) {
|
|
return value9;
|
|
}
|
|
value11 = env4_0(env4_2[34]);
|
|
if (value11.getIsActivitiesEnabledForCurrentPlatform()) {
|
|
binding = env4_1;
|
|
if (binding(env4_2[36])(value9 == null || value9.embedded_activity_config == null ? value : value9.embedded_activity_config.supported_platforms)) {
|
|
r17 = (channel == null ? value : channel.getGuildId()) ?? value;
|
|
binding = env4_0;
|
|
value16 = binding(env4_2[37]);
|
|
fetchShelf = value16.fetchShelf;
|
|
await Reflect.apply(fetchShelf, value16, [{guildId: r17}]);
|
|
value17 = undefined;
|
|
if (false) {
|
|
return value17;
|
|
}
|
|
activityConfigs = value17.activityConfigs;
|
|
applications = value17.applications;
|
|
binding = env4_1;
|
|
if (binding(env4_2[20])({applicationId: applicationId, activityConfigs: activityConfigs,
|
|
applications: applications}) != null) {
|
|
binding = env4_17;
|
|
value25 = binding.getEmbeddedActivitiesForChannel(channelId).find(function({applicationId}) {
|
|
return applicationId === applicationId;
|
|
});
|
|
size = value25 == null ? value : value25.userIds.size;
|
|
value26 = 0;
|
|
if ((size ?? value26) > value26) {
|
|
value30 = env4_0(env4_2[38]);
|
|
await value30.maybeJoinEmbeddedActivity({channelId: channelId, applicationId: applicationId,
|
|
launchId: value25 == null ? value : value25.launchId, inputApplication: null,
|
|
analyticsLocations: analyticsLocations, inviterUserId: inviterUserId});
|
|
return value;
|
|
}
|
|
binding = env4_1;
|
|
await binding(env4_2[39])({targetApplicationId: applicationId, channelId: channelId,
|
|
analyticsLocations: analyticsLocations, commandOrigin: commandOrigin,
|
|
inviterUserId: inviterUserId});
|
|
return value;
|
|
}
|
|
binding = env4_0;
|
|
value20 = binding(env4_2[37]);
|
|
fetchShelf = value20.fetchShelf;
|
|
await Reflect.apply(fetchShelf, value20, [{guildId: r17, force: true}]);
|
|
value21 = undefined;
|
|
if (false) {
|
|
return value21;
|
|
}
|
|
binding = env4_1;
|
|
value23 = binding(env4_2[20]);
|
|
activityConfigs = value21.activityConfigs;
|
|
applications = value21.applications;
|
|
value23({applicationId: applicationId, activityConfigs: activityConfigs, applications: applications});
|
|
binding = env4_17;
|
|
value25 = binding.getEmbeddedActivitiesForChannel(channelId).find(_fun64926);
|
|
size = value25 == null ? value : value25.userIds.size;
|
|
value26 = 0;
|
|
if ((size ?? value26) > value26) {
|
|
value30 = env4_0(env4_2[38]);
|
|
await value30.maybeJoinEmbeddedActivity({channelId: channelId, applicationId: applicationId,
|
|
launchId: value25 == null ? value : value25.launchId, inputApplication: null,
|
|
analyticsLocations: analyticsLocations, inviterUserId: inviterUserId});
|
|
return value;
|
|
}
|
|
binding = env4_1;
|
|
await binding(env4_2[39])({targetApplicationId: applicationId, channelId: channelId,
|
|
analyticsLocations: analyticsLocations, commandOrigin: commandOrigin,
|
|
inviterUserId: inviterUserId});
|
|
return value;
|
|
}
|
|
value14 = environment.__proto__.__proto__;
|
|
showLaunchErrorModal = EmbeddedActivitiesManager.showLaunchErrorModal;
|
|
binding = env4_0;
|
|
binding3 = env4_2;
|
|
intl = binding(binding3[35]).intl;
|
|
Reflect.apply(showLaunchErrorModal, EmbeddedActivitiesManager,
|
|
[intl.string(binding(binding3[35]).t.uGDCcw)]);
|
|
return value;
|
|
}
|
|
showLaunchErrorModal = EmbeddedActivitiesManager.showLaunchErrorModal;
|
|
binding = env4_0;
|
|
binding2 = env4_2;
|
|
intl = binding(binding2[35]).intl;
|
|
Reflect.apply(showLaunchErrorModal, EmbeddedActivitiesManager, [intl.string(binding(binding2[35]).t.UXoQTp)]);
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function _fun64929({location, applicationId}) { // fn#64929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8282:10862, offset: 0x01bb9a96, size: 95 bytes, params: 2, frame: 14
|
|
var binding;
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
value = require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */;
|
|
value = value.getEmbeddedActivityLocationGuildId(location);
|
|
if (guild.id === value) {
|
|
value = environment.__proto__;
|
|
binding = env1_0;
|
|
binding.leaveActivity({location: location, applicationId: applicationId});
|
|
}
|
|
}
|
|
|