/* Metro module 13013; source: modules/rpc/server/RPCServerManager.tsx; dependencies: [57, 6, 7, 7093, 1379, 1945, 1867, 4259, 4396, 4294, 3793, 1934, 1878, 4297, 661, 4237, 8066, 4291, 1360, 8081, 8095, 13014, 8082, 7116, 477, 694, 683, 566, 2] */ import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */ import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */ import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */ import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */ import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */ import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */ import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */ import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */ import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */ import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */ import MediaEngineStore from '../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */ import RTCConnectionStore from '../../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */ import VoiceStateStore from '../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */ import PresenceStore from '../../../stores/PresenceStore.tsx'; /* Metro dependency 4396 */ import QuestStore from '../../quests/QuestStore.tsx'; /* Metro dependency 7093 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */ import * as GlobalUtilsModule from '../../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */ import * as ConstantsModule2 from '../../activities/Constants.tsx'; /* Metro dependency 4237 */ import * as ConstantsModule3 from '../../../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */ import * as FramesConstantsModule from '../../frames/FramesConstants.tsx'; /* Metro dependency 8066 */ import * as RPCHelpersModule from '../RPCHelpers.tsx'; /* Metro dependency 8081 */ function _fun99302(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:6, offset: 0x021c36ac, size: 480 bytes, params: 8, frame: 19 const env0_0 = require; const _arrayLikeToArray_99305 = 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 Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ConstantsModule; const env0_17 = value.ActivityActionTypes; const env0_18 = value.RelationshipTypes; const env0_19 = value.AnalyticEvents; const env0_20 = value.RPCEvents; const env0_21 = value.RPCCloseCodes; value = _fun99306(); (FileImportTrackerModule).fileFinishedImporting('modules/rpc/server/RPCServerManager.tsx'); exports.default = value; function _createForOfIteratorHelperLoose_99303(a0, a1) { // fn#99303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:449, offset: 0x021c388c, size: 372 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 _fun99304; } value = undefined; if (a0) { if (typeof a0 === 'string') { value = _arrayLikeToArray_99305(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_99305(a0, value); r6 = value; } else { regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', ''); if (regexp.test(r9)) { value = _arrayLikeToArray_99305(a0, value); r6 = value; } else { r6 = value; } } r5 = r6; } } else { r5 = value; } if (r5) { if (r5) { } return _fun99304; } 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 _fun99304() { // fn#99304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:1020, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5 return env0_1 >= env0_0.length ? {done: true} : {done: false, value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]}; } } function _fun99306() { // fn#99306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:1365, offset: 0x021c3a00, size: 111 bytes, params: 1, frame: 15 return CreateClass(RPCServerManager, [{key: 'loadServer', value: value_99357}, {key: 'init', value: value_99358}, {key: 'terminate', value: value_99363}]); function RPCServerManager({server, transports, commands, events, stores, registerTransportsForEmbeddedPlatform}) { // fn#99307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:1386, offset: 0x021c3a6f, size: 424 bytes, params: 2, frame: 15 env1_4(this, RPCServerManager); this.handleMessage = handleMessage_99308; this.handleSpeaking = handleSpeaking_99309; this.handleVoiceChannelSelect = handleVoiceChannelSelect_99310; this.handleNotificationCreate = handleNotificationCreate; this.handleActivityJoin = handleActivityJoin; this.handleActivityLayoutModeUpdate = handleActivityLayoutModeUpdate; this.handleFrameUpdateLayoutMode = handleFrameUpdateLayoutMode; this.handleThermalStateChange = handleThermalStateChange; this.handleScreenOrientationUpdate = handleScreenOrientationUpdate; this.handleEmbeddedActivityUpdate = handleEmbeddedActivityUpdate; this.handleActivityMessage = handleActivityMessage; this.handleOAuth2TokenRevoke = function({accessToken}) { accessToken.rpcServer.sockets.forEach(_fun99331); }; this.handleGuildCreate = handleGuildCreate_99332; this.handleChannelCreate = handleChannelCreate_99333; this.handleLogout = handleLogout_99334; this.handleRelationshipAdd = handleRelationshipAdd_99336; this.handleRelationshipUpdate = handleRelationshipUpdate; this.handleRelationshipRemove = handleRelationshipRemove; this.handlePresenceUpdates = handlePresenceUpdates_99342; this.handlePresencesReplace = handlePresencesReplace; this.handleUserUpdate = handleUserUpdate_99349; this.handleEntitlementCreate = handleEntitlementCreate; this.handleEntitlementDelete = handleEntitlementDelete; this.handleQuestEnrollSuccess = handleQuestEnrollSuccess; this.rpcServer = server; this.transports = transports; this.rpcCommandHandlers = commands; this.rpcEventHandlers = events; this.stores = stores; this.registerTransportsForEmbeddedPlatform = registerTransportsForEmbeddedPlatform; function RPCServerManagerHandleMessage(a0) { // fn#99308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:1470, owner: RPCServerManager.handleMessage, offset: 0x021c3c17, size: 405 bytes, params: 2, frame: 22 var r4; var r5; var r6; var value2; var MESSAGE_DELETE; var channelId; var object; var id; var value4; var MESSAGE_UPDATE; var message; var channel_id; var value6; var MESSAGE_CREATE; var dispatchToSubscriptions; var object2; var value; let rpcServer = env0_0.rpcServer; if (rpcServer.subscriptions.length === 0) { return undefined; } let type = a0.type; if (type === 'MESSAGE_CREATE') { env0_0.handleActivityMessage(a0); } type = a0.type; if (type === 'MESSAGE_CREATE') { message = a0.message; if (message.state === 'SENDING') { return undefined; } value6 = environment.__proto__.__proto__; MESSAGE_CREATE = RPCEvents.MESSAGE_CREATE; channelId = a0.channelId; message = a0.message; r4 = '' + MESSAGE_CREATE + a0.message.id; r5 = MESSAGE_CREATE; r6 = channelId; if (r6 != null) { rpcServer = env0_0.rpcServer; dispatchToSubscriptions = rpcServer.dispatchToSubscriptions; object = {channel_id: r6}; object2 = {channel_id: r6}; value = environment.__proto__.__proto__; value = require(8081) /* metro dependency 8081: RPCHelpers */; object2.message = value.transformInternalTextMessage(message); Reflect.apply(dispatchToSubscriptions, rpcServer, [r5, object, object2, r4]); } return undefined; } if (type === 'MESSAGE_UPDATE') { value4 = environment.__proto__.__proto__; MESSAGE_UPDATE = RPCEvents.MESSAGE_UPDATE; message = a0.message; channel_id = message.channel_id; message = a0.message; r4 = null; r5 = MESSAGE_UPDATE; r6 = channel_id; if (r6 != null) { rpcServer = env0_0.rpcServer; dispatchToSubscriptions = rpcServer.dispatchToSubscriptions; object = {channel_id: r6}; object2 = {channel_id: r6}; value = environment.__proto__.__proto__; value = require(8081) /* metro dependency 8081: RPCHelpers */; object2.message = value.transformInternalTextMessage(message); Reflect.apply(dispatchToSubscriptions, rpcServer, [r5, object, object2, r4]); } return undefined; } if (type === 'MESSAGE_DELETE') { value2 = environment.__proto__.__proto__; MESSAGE_DELETE = RPCEvents.MESSAGE_DELETE; channelId = a0.channelId; object = {}; id = a0.id; object.id = id; id = a0.id; r4 = '' + MESSAGE_DELETE + id; r5 = MESSAGE_DELETE; r6 = channelId; if (r6 != null) { rpcServer = env0_0.rpcServer; dispatchToSubscriptions = rpcServer.dispatchToSubscriptions; object = {channel_id: r6}; object2 = {channel_id: r6}; value = environment.__proto__.__proto__; value = require(8081) /* metro dependency 8081: RPCHelpers */; object2.message = value.transformInternalTextMessage(object); Reflect.apply(dispatchToSubscriptions, rpcServer, [r5, object, object2, r4]); } return undefined; } value = environment.__proto__.__proto__; return (GlobalUtilsModule).assertNever(a0); } function RPCServerManagerHandleSpeaking(a0) { // fn#99309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:2109, owner: RPCServerManager.handleSpeaking, offset: 0x021c3dac, size: 239 bytes, params: 2, frame: 18 var r4; let rpcServer = env0_0.rpcServer; if (rpcServer.subscriptions.length !== 0) { r4 = a0.speakingFlags !== 0 ? RPCEvents.SPEAKING_START : RPCEvents.SPEAKING_STOP; var context = a0.context; var DEFAULT = MediaEngineContextTypes.DEFAULT; if (context !== DEFAULT) { return undefined; } var voiceChannelId = SelectedChannelStore.getVoiceChannelId(); if (voiceChannelId == null) { return undefined; } var channel = ChannelStore.getChannel(voiceChannelId); if (channel == null) { return undefined; } var voiceStateStoreBinding = VoiceStateStore; var getVoiceState = voiceStateStoreBinding.getVoiceState; var guildId = channel.getGuildId(); var userId = a0.userId; var value8 = Reflect.apply(getVoiceState, voiceStateStoreBinding, [guildId, userId]); if (value8 == null) { return undefined; } rpcServer = env0_0.rpcServer; var dispatchToSubscriptions = rpcServer.dispatchToSubscriptions; var object = {}; var channelId = value8.channelId; object.channel_id = channelId; channelId = value8.channelId; userId = a0.userId; Reflect.apply(dispatchToSubscriptions, rpcServer, [r4, object, {channel_id: channelId, user_id: userId}]); } } function RPCServerManagerHandleVoiceChannelSelect({guildId, channelId}) { // fn#99310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:2530, owner: RPCServerManager.handleVoiceChannelSelect, offset: 0x021c3e9b, size: 95 bytes, params: 2, frame: 16 var dispatchToSubscriptions; let rpcServer = env0_0.rpcServer; if (rpcServer.subscriptions.length !== 0) { rpcServer = env0_0.rpcServer; dispatchToSubscriptions = rpcServer.dispatchToSubscriptions; value = environment.__proto__.__proto__; Reflect.apply(dispatchToSubscriptions, rpcServer, [RPCEvents.VOICE_CHANNEL_SELECT, {}, {channel_id: channelId, guild_id: guildId}]); } } function handleNotificationCreate({channelId, message, icon, title, body}) { // fn#99311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:2722, owner: RPCServerManager.handleNotificationCreate, offset: 0x021c3efa, size: 196 bytes, params: 2, frame: 23 var r6; var dispatchToSubscriptions; var NOTIFICATION_CREATE; var object; var value2; var value; let rpcServer = env0_0.rpcServer; if (rpcServer.subscriptions.length !== 0) { rpcServer = env0_0.rpcServer; dispatchToSubscriptions = rpcServer.dispatchToSubscriptions; value = environment.__proto__.__proto__; NOTIFICATION_CREATE = RPCEvents.NOTIFICATION_CREATE; object = {channel_id: channelId}; object.message = (require(8081) /* metro dependency 8081: RPCHelpers */).transformInternalTextMessage(message); value2 = null; if (value2 != icon) { value = require(8081) /* metro dependency 8081: RPCHelpers */; value = value.getRemoteIconURL(icon); r6 = value; } else { r6 = value2; } object.icon_url = r6; object.title = title; object.body = body; Reflect.apply(dispatchToSubscriptions, rpcServer, [NOTIFICATION_CREATE, {}, object]); } } function handleActivityJoin({applicationId, parentApplicationId, secret, intent, embedded}) { // fn#99312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:3035, owner: RPCServerManager.handleActivityJoin, offset: 0x021c3fbe, size: 172 bytes, params: 2, frame: 18 var environment; var object; var binding; var dispatchToSubscriptions; const applicationId2 = applicationId; let rpcServer = applicationId2.rpcServer; if (rpcServer.subscriptions.length !== 0) { object = {application_id: applicationId, secret: secret}; if (embedded) { object.intent = intent; } binding = applicationId2; rpcServer = binding.rpcServer; dispatchToSubscriptions = rpcServer.dispatchToSubscriptions; value = environment.__proto__.__proto__; Reflect.apply(dispatchToSubscriptions, rpcServer, [RPCEvents.ACTIVITY_JOIN, _fun99313, object]); rpcServer = binding.rpcServer; rpcServer.dispatchToSubscriptions(RPCEvents.GAME_JOIN, function(a0) { return a0.socket.application.id === applicationId; }, object); } function _fun99313(a0) { // fn#99313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:3258, offset: 0x021c406a, size: 76 bytes, params: 2, frame: 5 return a0.socket.application.id === applicationId || parentApplicationId != null && a0.socket.application.parentId === parentApplicationId; } } function handleActivityLayoutModeUpdate({applicationId, layoutMode}) { // fn#99315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:3462, owner: RPCServerManager.handleActivityLayoutModeUpdate, offset: 0x021c40d6, size: 192 bytes, params: 2, frame: 19 var environment; var value2; var FOCUSED; var binding; var object; let rpcServer = applicationId.rpcServer; if (rpcServer.subscriptions.length !== 0) { value2 = environment.__proto__.__proto__; FOCUSED = ActivityLayoutMode.FOCUSED; binding = applicationId; rpcServer = binding.rpcServer; rpcServer.dispatchToSubscriptions(RPCEvents.ACTIVITY_PIP_MODE_UPDATE, function(a0) { return a0.socket.application.id === applicationId; }, {is_pip_mode: layoutMode !== FOCUSED}); object = {layout_mode: layoutMode}; rpcServer = binding.rpcServer; rpcServer.dispatchToSubscriptions(RPCEvents.ACTIVITY_LAYOUT_MODE_UPDATE, _fun99317, object); rpcServer = binding.rpcServer; rpcServer.dispatchToSubscriptions(RPCEvents.FRAME_LAYOUT_MODE_UPDATE, _fun99318, object); } function _fun99317({socket}) { // fn#99317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:3769, offset: 0x021c40b6, size: 32 bytes, params: 2, frame: 2 return socket.application.id === applicationId; } function _fun99318({socket}) { // fn#99318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:3871, offset: 0x021c40b6, size: 32 bytes, params: 2, frame: 2 return socket.application.id === applicationId; } } function handleFrameUpdateLayoutMode({applicationId, layoutMode}) { // fn#99319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:3941, owner: RPCServerManager.handleFrameUpdateLayoutMode, offset: 0x021c4196, size: 228 bytes, params: 2, frame: 19 var environment; var r3; var value2; var FOCUSED; var binding; var object; let rpcServer = applicationId.rpcServer; if (rpcServer.subscriptions.length !== 0) { value2 = environment.__proto__.__proto__; r3 = layoutMode === FrameLayoutModes.PIP ? ActivityLayoutMode.PIP : ActivityLayoutMode.FOCUSED; FOCUSED = ActivityLayoutMode.FOCUSED; binding = applicationId; rpcServer = binding.rpcServer; rpcServer.dispatchToSubscriptions(RPCEvents.ACTIVITY_PIP_MODE_UPDATE, function(a0) { return a0.socket.application.id === applicationId; }, {is_pip_mode: r3 !== FOCUSED}); object = {layout_mode: r3}; rpcServer = binding.rpcServer; rpcServer.dispatchToSubscriptions(RPCEvents.ACTIVITY_LAYOUT_MODE_UPDATE, _fun99321, object); rpcServer = binding.rpcServer; rpcServer.dispatchToSubscriptions(RPCEvents.FRAME_LAYOUT_MODE_UPDATE, _fun99322, object); } function _fun99321({socket}) { // fn#99321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:4276, offset: 0x021c40b6, size: 32 bytes, params: 2, frame: 2 return socket.application.id === applicationId; } function _fun99322({socket}) { // fn#99322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:4378, offset: 0x021c40b6, size: 32 bytes, params: 2, frame: 2 return socket.application.id === applicationId; } } function handleThermalStateChange({applicationId}) { // fn#99323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:4445, owner: RPCServerManager.handleThermalStateChange, offset: 0x021c427a, size: 136 bytes, params: 2, frame: 17 var environment; var object; var value2; const applicationId2 = applicationId; let rpcServer = applicationId2.rpcServer; if (rpcServer.subscriptions.length !== 0) { if (applicationId != null) { object = {}; value2 = environment.__proto__.__proto__; object.thermal_state = (require(8095) /* metro dependency 8095: useThermalState */).getThermalState(); rpcServer = applicationId2.rpcServer; rpcServer.dispatchToSubscriptions(RPCEvents.THERMAL_STATE_UPDATE, function(a0) { return a0.socket.application.id === applicationId; }, object); } } } function handleScreenOrientationUpdate({screenOrientation}) { // fn#99325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:4705, owner: RPCServerManager.handleScreenOrientationUpdate, offset: 0x021c4302, size: 88 bytes, params: 2, frame: 15 var dispatchToSubscriptions; let rpcServer = env0_0.rpcServer; if (rpcServer.subscriptions.length !== 0) { rpcServer = env0_0.rpcServer; dispatchToSubscriptions = rpcServer.dispatchToSubscriptions; value = environment.__proto__.__proto__; Reflect.apply(dispatchToSubscriptions, rpcServer, [RPCEvents.ORIENTATION_UPDATE, {}, {screen_orientation: screenOrientation}]); } } function handleEmbeddedActivityUpdate() { // fn#99326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:4894, owner: RPCServerManager.handleEmbeddedActivityUpdate, offset: 0x021c435a, size: 104 bytes, params: 1, frame: 15 var value2; var value3; let rpcServer = env0_0.rpcServer; if (rpcServer.subscriptions.length !== 0) { value2 = environment.__proto__.__proto__; value3 = (require(13014) /* metro dependency 13014: activityInstanceConnectedParticipants */).activityInstanceConnectedParticipants(); rpcServer = env0_0.rpcServer; rpcServer.dispatchToSubscriptions(RPCEvents.ACTIVITY_INSTANCE_PARTICIPANTS_UPDATE, {}, value3); } } function handleActivityMessage({channelId, message}) { // fn#99327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:5113, owner: RPCServerManager.handleActivityMessage, offset: 0x021c43c2, size: 541 bytes, params: 2, frame: 26 var environment; var r9; var application; var activity; var value3; var userStoreBinding; var value4; var currentUser; var type; var dispatchToSubscriptions; var ACTIVITY_JOIN_REQUEST; var object; var ACTIVITY_INVITE; let env0_0 = undefined; let rpcServer = env0_0.rpcServer; if (rpcServer.subscriptions.length !== 0) { application = message.application; activity = message.activity; if (application != null) { if (activity != null) { if (activity.party_id != null) { value3 = environment.__proto__.__proto__; userStoreBinding = UserStore; value4 = userStoreBinding.getUser(message.author?.id); if (value4 != null) { currentUser = UserStore.getCurrentUser(); if (currentUser != null) { if (value4.id !== currentUser.id) { type = activity.type; r9 = type === ActivityActionTypes.JOIN_REQUEST ? PresenceStore.getApplicationActivity(currentUser.id, application.id) : PresenceStore.getApplicationActivity(value4.id, application.id); if (r9 != null) { if (r9.party != null) { if (r9.party.id === activity.party_id) { env0_0 = r9.application_id; type = activity.type; if (ActivityActionTypes.JOIN === type) { rpcServer = env0_0.rpcServer; dispatchToSubscriptions = rpcServer.dispatchToSubscriptions; ACTIVITY_INVITE = RPCEvents.ACTIVITY_INVITE; object = {}; object.user = (importDefault(8082) /* metro dependency 8082: transformUser */)(value4); object.activity = r9; object.type = activity.type; object.channel_id = channelId; object.message_id = message.id; Reflect.apply(dispatchToSubscriptions, rpcServer, [ACTIVITY_INVITE, function(a0) { return a0.socket.application.id === application_id; }, object]); } else if (ActivityActionTypes.JOIN_REQUEST === type) { rpcServer = env0_0.rpcServer; dispatchToSubscriptions = rpcServer.dispatchToSubscriptions; ACTIVITY_JOIN_REQUEST = RPCEvents.ACTIVITY_JOIN_REQUEST; object = {}; object.user = (importDefault(8082) /* metro dependency 8082: transformUser */)(value4); object.activity = r9; object.type = activity.type; object.channel_id = channelId; object.message_id = message.id; Reflect.apply(dispatchToSubscriptions, rpcServer, [ACTIVITY_JOIN_REQUEST, _fun99329, object]); } } } } } } } } } } } function _fun99329({socket}) { // fn#99329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:5829, offset: 0x021c40b6, size: 32 bytes, params: 2, frame: 2 return socket.application.id === application_id; } } function handleOAuth2TokenRevoke({accessToken}) { // fn#99330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:5969, owner: RPCServerManager.handleOAuth2TokenRevoke, offset: 0x021c45df, size: 55 bytes, params: 2, frame: 11 accessToken.rpcServer.sockets.forEach(_fun99331); function _fun99331(a0) { // fn#99331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:6021, offset: 0x021c4616, size: 61 bytes, params: 2, frame: 13 var close; if (a0.authorization.accessToken === accessToken) { close = a0.close; value = environment.__proto__.__proto__.__proto__; Reflect.apply(close, a0, [RPCCloseCodes.TOKEN_REVOKED, 'Token revoked']); } } } function RPCServerManagerHandleGuildCreate({guild}) { // fn#99332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:6126, owner: RPCServerManager.handleGuildCreate, offset: 0x021c4653, size: 127 bytes, params: 2, frame: 16 const id = guild.id; const guild2 = GuildStore.getGuild(id); let rpcServer = env0_0.rpcServer; if (rpcServer.subscriptions.length !== 0 && guild2 != null) { rpcServer = env0_0.rpcServer; rpcServer.dispatchToSubscriptions(RPCEvents.GUILD_CREATE, {}, {id: id, name: guild2.name}); } } function RPCServerManagerHandleChannelCreate({channel}) { // fn#99333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:6318, owner: RPCServerManager.handleChannelCreate, offset: 0x021c46d2, size: 109 bytes, params: 2, frame: 17 var dispatchToSubscriptions; const id = channel.id; const name = channel.name; const type = channel.type; let rpcServer = env0_0.rpcServer; if (rpcServer.subscriptions.length !== 0) { rpcServer = env0_0.rpcServer; dispatchToSubscriptions = rpcServer.dispatchToSubscriptions; value = environment.__proto__.__proto__; Reflect.apply(dispatchToSubscriptions, rpcServer, [RPCEvents.CHANNEL_CREATE, {}, {id: id, name: name, type: type}]); } } function RPCServerManagerHandleLogout() { // fn#99334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:6494, owner: RPCServerManager.handleLogout, offset: 0x021c473f, size: 42 bytes, params: 1, frame: 11 env0_0.rpcServer.sockets.forEach(function(a0) { return a0.close(RPCCloseCodes.CLOSE_NORMAL, 'User logout'); }); } function RPCServerManagerHandleRelationshipAdd({relationship}) { // fn#99336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:6602, owner: RPCServerManager.handleRelationshipAdd, offset: 0x021c478d, size: 161 bytes, params: 2, frame: 19 var environment; var value2; var user; const id = relationship.id; const type = relationship.type; let rpcServer = undefined.rpcServer; if (rpcServer.subscriptions.length !== 0) { value2 = environment.__proto__.__proto__; user = UserStore.getUser(id); if (user != null) { rpcServer = (require(8081) /* metro dependency 8081: RPCHelpers */).transformBaseRelationship(type, user).rpcServer; rpcServer.dispatchToSubscriptions(RPCEvents.RELATIONSHIP_UPDATE, {}, _fun99337); } } function _fun99337({socket}) { // fn#99337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:6822, offset: 0x021c482e, size: 65 bytes, params: 2, frame: 13 let value = environment.__proto__.__proto__.__proto__; value = require(8081) /* metro dependency 8081: RPCHelpers */; return value.transformApplicationRelationship(env0_0, socket.application.id); } } function handleRelationshipUpdate({relationship}) { // fn#99338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:6930, owner: RPCServerManager.handleRelationshipUpdate, offset: 0x021c486f, size: 161 bytes, params: 2, frame: 19 var environment; var value2; var user; const id = relationship.id; const type = relationship.type; let rpcServer = undefined.rpcServer; if (rpcServer.subscriptions.length !== 0) { value2 = environment.__proto__.__proto__; user = UserStore.getUser(id); if (user != null) { rpcServer = (require(8081) /* metro dependency 8081: RPCHelpers */).transformBaseRelationship(type, user).rpcServer; rpcServer.dispatchToSubscriptions(RPCEvents.RELATIONSHIP_UPDATE, {}, _fun99339); } } function _fun99339({socket}) { // fn#99339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:7150, offset: 0x021c482e, size: 65 bytes, params: 2, frame: 13 let value = environment.__proto__.__proto__.__proto__; value = require(8081) /* metro dependency 8081: RPCHelpers */; return value.transformApplicationRelationship(env0_0, socket.application.id); } } function handleRelationshipRemove({relationship}) { // fn#99340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:7258, owner: RPCServerManager.handleRelationshipRemove, offset: 0x021c4910, size: 166 bytes, params: 2, frame: 18 var environment; var value2; var user; var moduleValue; const id = relationship.id; let rpcServer = undefined.rpcServer; if (rpcServer.subscriptions.length !== 0) { value2 = environment.__proto__.__proto__; user = UserStore.getUser(id); if (user != null) { moduleValue = require(8081) /* metro dependency 8081: RPCHelpers */; rpcServer = moduleValue.transformBaseRelationship(RelationshipTypes.NONE, user).rpcServer; rpcServer.dispatchToSubscriptions(RPCEvents.RELATIONSHIP_UPDATE, {}, _fun99341); } } function _fun99341({socket}) { // fn#99341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:7476, offset: 0x021c482e, size: 65 bytes, params: 2, frame: 13 let value = environment.__proto__.__proto__.__proto__; value = require(8081) /* metro dependency 8081: RPCHelpers */; return value.transformApplicationRelationship(env0_0, socket.application.id); } } function RPCServerManagerHandlePresenceUpdates({updates}) { // fn#99342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:7581, owner: RPCServerManager.handlePresenceUpdates, offset: 0x021c49b6, size: 162 bytes, params: 2, frame: 16 var environment; var r2; var handlePresenceUpdates_loop2; var _createForOfIteratorHelperLoose_99303Binding; var Set; var map; var prototype; var value2; var set; var values; var value3; var done; var value4; var value5; let env0_0 = undefined; let value = environment; reducibleJoin3: while (true) { if (env0_0.rpcServer.subscriptions.length === 0) { break reducibleJoin3; } handlePresenceUpdates_loop2 = handlePresenceUpdates_loop; value = environment.__proto__.__proto__; _createForOfIteratorHelperLoose_99303Binding = _createForOfIteratorHelperLoose_99303; Set = global.Set; map = updates.map; value = Reflect.apply(map, updates, [function(a0) { return a0.user.id; }]); prototype = Set.prototype; value2 = Object.create(prototype, {constructor: {value: Set}}); set = new Set(value); value = set instanceof Object ? set : value2; values = value.values; value = _createForOfIteratorHelperLoose_99303Binding(Reflect.apply(values, value, [])); value3 = value(); done = value3.done; if (done) { break reducibleJoin3; } r2 = value3; reducibleLoop2: while (true) { value4 = r2.value; env0_0 = value4; handlePresenceUpdates_loop2(); value5 = value(); done = value5.done; if (done) { break reducibleJoin3; } r2 = value5; continue reducibleLoop2; } } function handlePresenceUpdates_loop() { // fn#99343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:7656, owner: RPCServerManager.handlePresenceUpdates._loop, offset: 0x021c4a58, size: 159 bytes, params: 1, frame: 17 const relationshipType = RelationshipStore.getRelationshipType(value); const NONE = RelationshipTypes.NONE; if (relationshipType === NONE) { return 0; } const user = UserStore.getUser(value); if (user == null) { return 0; } const env0_0 = (RPCHelpersModule).transformBaseRelationship(relationshipType, user); const rpcServer = env1_1.rpcServer; const dispatchToSubscriptions = rpcServer.dispatchToSubscriptions; const RELATIONSHIP_UPDATE = RPCEvents.RELATIONSHIP_UPDATE; Reflect.apply(dispatchToSubscriptions, rpcServer, [RELATIONSHIP_UPDATE, {}, _fun99344]); function _fun99344({socket}) { // fn#99344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:7869, offset: 0x021c4af7, size: 65 bytes, params: 2, frame: 13 let value = environment.__proto__.__proto__.__proto__.__proto__; value = require(8081) /* metro dependency 8081: RPCHelpers */; return value.transformApplicationRelationship(env0_0, socket.application.id); } } } function handlePresencesReplace() { // fn#99346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:8092, owner: RPCServerManager.handlePresencesReplace, offset: 0x021c4b38, size: 149 bytes, params: 1, frame: 20 var environment; var r1; var handlePresencesReplace_loop22; var _createForOfIteratorHelperLoose_99303Binding; var relationshipStoreBinding; var getMutableRelationships; var value2; var entries; var value3; var value4; var value5; var done; var value6; var value7; var value8; reducibleJoin3: while (true) { if (env0_0.rpcServer.subscriptions.length === 0) { break reducibleJoin3; } handlePresencesReplace_loop22 = handlePresencesReplace_loop2; value = environment.__proto__.__proto__; _createForOfIteratorHelperLoose_99303Binding = _createForOfIteratorHelperLoose_99303; relationshipStoreBinding = RelationshipStore; getMutableRelationships = relationshipStoreBinding.getMutableRelationships; value2 = Reflect.apply(getMutableRelationships, relationshipStoreBinding, []); entries = value2.entries; value3 = Reflect.apply(entries, value2, []); value4 = _createForOfIteratorHelperLoose_99303Binding(value3); value5 = value4(); done = value5.done; if (done) { break reducibleJoin3; } r1 = value5; reducibleLoop2: while (true) { value6 = r1.value; value7 = env2_3(value6, 2); var env0_0 = value7[0]; var env0_1 = value7[1]; handlePresencesReplace_loop22(); value8 = value4(); done = value8.done; if (done) { break reducibleJoin3; } r1 = value8; continue reducibleLoop2; } } function handlePresencesReplace_loop2() { // fn#99347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:8157, owner: RPCServerManager.handlePresencesReplace._loop2, offset: 0x021c4bcd, size: 148 bytes, params: 1, frame: 17 const binding = env0_1; const NONE = RelationshipTypes.NONE; if (binding === NONE) { return 0; } const user = UserStore.getUser(env0_0); if (user == null) { return 0; } var env0_0 = (RPCHelpersModule).transformBaseRelationship(env0_1, user); const rpcServer = env1_1.rpcServer; const dispatchToSubscriptions = rpcServer.dispatchToSubscriptions; const RELATIONSHIP_UPDATE = RPCEvents.RELATIONSHIP_UPDATE; Reflect.apply(dispatchToSubscriptions, rpcServer, [RELATIONSHIP_UPDATE, {}, _fun99348]); function _fun99348({socket}) { // fn#99348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:8339, offset: 0x021c4af7, size: 65 bytes, params: 2, frame: 13 let value = environment.__proto__.__proto__.__proto__.__proto__; value = require(8081) /* metro dependency 8081: RPCHelpers */; return value.transformApplicationRelationship(env0_0, socket.application.id); } } } function RPCServerManagerHandleUserUpdate({user}) { // fn#99349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:8574, owner: RPCServerManager.handleUserUpdate, offset: 0x021c4c61, size: 187 bytes, params: 2, frame: 19 var environment; var value2; var relationshipType; var user2; const id = user.id; let rpcServer = undefined.rpcServer; if (rpcServer.subscriptions.length !== 0) { value2 = environment.__proto__.__proto__; relationshipType = RelationshipStore.getRelationshipType(id); if (relationshipType !== RelationshipTypes.NONE) { user2 = UserStore.getUser(id); if (user2 != null) { rpcServer = (require(8081) /* metro dependency 8081: RPCHelpers */).transformBaseRelationship(relationshipType, user2).rpcServer; rpcServer.dispatchToSubscriptions(RPCEvents.RELATIONSHIP_UPDATE, {}, _fun99350); } } } function _fun99350({socket}) { // fn#99350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:8825, offset: 0x021c482e, size: 65 bytes, params: 2, frame: 13 let value = environment.__proto__.__proto__.__proto__; value = require(8081) /* metro dependency 8081: RPCHelpers */; return value.transformApplicationRelationship(env0_0, socket.application.id); } } function handleEntitlementCreate({entitlement}) { // fn#99351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:8933, owner: RPCServerManager.handleEntitlementCreate, offset: 0x021c4d1c, size: 99 bytes, params: 2, frame: 16 var environment; var dispatchToSubscriptions; const entitlement2 = entitlement; let rpcServer = entitlement2.rpcServer; if (rpcServer.subscriptions.length !== 0) { rpcServer = entitlement2.rpcServer; dispatchToSubscriptions = rpcServer.dispatchToSubscriptions; value = environment.__proto__.__proto__; Reflect.apply(dispatchToSubscriptions, rpcServer, [RPCEvents.ENTITLEMENT_CREATE, function(a0) { return a0.socket.application.id === entitlement.application_id; }, {entitlement: entitlement}]); } } function handleEntitlementDelete({entitlement}) { // fn#99353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:9149, owner: RPCServerManager.handleEntitlementDelete, offset: 0x021c4da5, size: 99 bytes, params: 2, frame: 16 var environment; var dispatchToSubscriptions; const entitlement2 = entitlement; let rpcServer = entitlement2.rpcServer; if (rpcServer.subscriptions.length !== 0) { rpcServer = entitlement2.rpcServer; dispatchToSubscriptions = rpcServer.dispatchToSubscriptions; value = environment.__proto__.__proto__; Reflect.apply(dispatchToSubscriptions, rpcServer, [RPCEvents.ENTITLEMENT_DELETE, function(a0) { return a0.socket.application.id === entitlement.application_id; }, {entitlement: entitlement}]); } } function handleQuestEnrollSuccess({enrolledQuestUserStatus}) { // fn#99355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:9366, owner: RPCServerManager.handleQuestEnrollSuccess, offset: 0x021c4e08, size: 202 bytes, params: 2, frame: 21 var environment; var questId; var value2; var quest; var dispatchToSubscriptions; var QUEST_ENROLLMENT_STATUS_UPDATE; var object; var enrolledAt; let env0_0 = undefined; let rpcServer = env0_0.rpcServer; if (rpcServer.subscriptions.length !== 0) { questId = enrolledQuestUserStatus.questId; env0_0 = questId; value2 = environment.__proto__.__proto__; quest = QuestStore.getQuest(questId); if (quest != null) { if ((require(7116) /* metro dependency 7116: QuestTaskUtils */).getActivityApplicationId(quest) != null) { rpcServer = env0_0.rpcServer; dispatchToSubscriptions = rpcServer.dispatchToSubscriptions; QUEST_ENROLLMENT_STATUS_UPDATE = RPCEvents.QUEST_ENROLLMENT_STATUS_UPDATE; object = {quest_id: questId}; enrolledAt = enrolledQuestUserStatus.enrolledAt; object.is_enrolled = enrolledAt != null; enrolledAt = enrolledQuestUserStatus.enrolledAt; object.enrolled_at = enrolledAt; Reflect.apply(dispatchToSubscriptions, rpcServer, [QUEST_ENROLLMENT_STATUS_UPDATE, _fun99356, object]); } } } function _fun99356(a0) { // fn#99356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:9612, offset: 0x021c4ed2, size: 66 bytes, params: 2, frame: 5 return a0.socket.application.id === env0_1 && a0.args?.quest_id === questId; } } } function value_99357() { // fn#99357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:10024, offset: 0x021c4f14, size: 307 bytes, params: 1, frame: 22 var r2; var r3; var registerTransportsForEmbeddedPlatform; var value4; var rpcServer; var registerTransport; var value5; var property; var value8; var property2; var setCommandHandler; var value9; var value11; var property3; var setEventHandler; var value12; reducibleJoin2: while (true) { if ((require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded) { registerTransportsForEmbeddedPlatform = this.registerTransportsForEmbeddedPlatform; Reflect.apply(registerTransportsForEmbeddedPlatform, this, []); break reducibleJoin2; } break reducibleJoin2; } const value2 = _createForOfIteratorHelperLoose_99303(this.transports); const value3 = value2(); let done = value3.done; if (!done) { r2 = value3; reducibleLoop3: while (true) { value4 = r2.value; rpcServer = this.rpcServer; registerTransport = rpcServer.registerTransport; Reflect.apply(registerTransport, rpcServer, [value4]); value5 = value2(); done = value5.done; if (done) { break reducibleLoop3; } r2 = value5; continue reducibleLoop3; } } const rpcCommandHandlers = this.rpcCommandHandlers; let Object = global.Object; const value6 = Object.entries(rpcCommandHandlers); let length = value6.length; const value7 = 0; if (value7 < length) { r3 = value7; reducibleLoop5: while (true) { property = value6[r3]; value8 = env1_3(property, 2); property = value8[value7]; property2 = value8[1]; rpcServer = this.rpcServer; setCommandHandler = rpcServer.setCommandHandler; Reflect.apply(setCommandHandler, rpcServer, [property, property2]); value9 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1; length = value6.length; if (value9 < length) { r3 = value9; continue reducibleLoop5; } break reducibleLoop5; } } const rpcEventHandlers = this.rpcEventHandlers; Object = global.Object; const value10 = Object.entries(rpcEventHandlers); length = value10.length; if (value7 < length) { r2 = value7; reducibleLoop7: while (true) { property = value10[r2]; value11 = env1_3(property, 2); property = value11[value7]; property3 = value11[1]; rpcServer = this.rpcServer; setEventHandler = rpcServer.setEventHandler; Reflect.apply(setEventHandler, rpcServer, [property, property3]); value12 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1; length = value10.length; if (value12 < length) { r2 = value12; continue reducibleLoop7; } break reducibleLoop7; } } } function value_99358() { // fn#99358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:10557, offset: 0x021c5047, size: 1005 bytes, params: 1, frame: 18 var environment; this.rpcServer.getCurrentUser = function() { return UserStore.getCurrentUser(); }; this.rpcServer.onConnect = onConnect_99360; this.rpcServer.onDisconnect = onDisconnect_99361; let value = environment.__proto__; const items2 = [ChannelStore]; items2[1] = GuildMemberStore; items2[2] = PresenceStore; items2[3] = VoiceStateStore; items2[4] = MediaEngineStore; items2[5] = RTCConnectionStore; const BatchedStoreListener = (FluxModule).BatchedStoreListener; const value2 = items2.concat(this.stores); const value3 = Object.create(BatchedStoreListener.prototype, {constructor: {value: BatchedStoreListener}}); const batchedStoreListener = new BatchedStoreListener(value2, _fun99362); (batchedStoreListener instanceof Object ? batchedStoreListener : value3).attach('RPCServerManager'); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('MESSAGE_CREATE', this.handleMessage); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('MESSAGE_UPDATE', this.handleMessage); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('MESSAGE_DELETE', this.handleMessage); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('SPEAKING', this.handleSpeaking); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('OAUTH2_TOKEN_REVOKE', this.handleOAuth2TokenRevoke); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('GUILD_CREATE', this.handleGuildCreate); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('CHANNEL_CREATE', this.handleChannelCreate); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('LOGOUT', this.handleLogout); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('VOICE_CHANNEL_SELECT', this.handleVoiceChannelSelect); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('RPC_NOTIFICATION_CREATE', this.handleNotificationCreate); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('ACTIVITY_JOIN', this.handleActivityJoin); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('ACTIVITY_LAYOUT_MODE_UPDATE', this.handleActivityLayoutModeUpdate); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('FRAME_UPDATE_LAYOUT_MODE', this.handleFrameUpdateLayoutMode); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('THERMAL_STATE_CHANGE', this.handleThermalStateChange); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('ACTIVITY_SCREEN_ORIENTATION_UPDATE', this.handleScreenOrientationUpdate); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('EMBEDDED_ACTIVITY_UPDATE', this.handleEmbeddedActivityUpdate); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('RELATIONSHIP_ADD', this.handleRelationshipAdd); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('RELATIONSHIP_UPDATE', this.handleRelationshipUpdate); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('RELATIONSHIP_REMOVE', this.handleRelationshipRemove); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('PRESENCE_UPDATES', this.handlePresenceUpdates); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('PRESENCES_REPLACE', this.handlePresencesReplace); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('USER_UPDATE', this.handleUserUpdate); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('ENTITLEMENT_CREATE', this.handleEntitlementCreate); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('ENTITLEMENT_DELETE', this.handleEntitlementDelete); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.subscribe('QUESTS_ENROLL_SUCCESS', this.handleQuestEnrollSuccess); function value_99358OnConnect(a0) { // fn#99360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:10651, owner: value_99358.onConnect, offset: 0x021c5446, size: 130 bytes, params: 2, frame: 18 (Dispatcher).dispatch({type: 'RPC_APP_CONNECTED', socketId: a0.id, application: a0.application}); const defaultImport2 = AnalyticsUtils; const track = defaultImport2.track; const AUTHORIZED_APP_CONNECTED = AnalyticEvents.AUTHORIZED_APP_CONNECTED; Reflect.apply(track, defaultImport2, [AUTHORIZED_APP_CONNECTED, {app_id: a0.application.id, transport: a0.transport}]); } function value_99358OnDisconnect({id, application}, a1) { // fn#99361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:10861, owner: value_99358.onDisconnect, offset: 0x021c54c8, size: 77 bytes, params: 3, frame: 14 const value = environment.__proto__.__proto__; (Dispatcher).dispatch({type: 'RPC_APP_DISCONNECTED', socketId: id, application: application, reason: a1}); } function _fun99362() { // fn#99362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:11047, offset: 0x021c5515, size: 27 bytes, params: 1, frame: 9 return env0_0.rpcServer.updateSubscriptions(); } } function value_99363() { // fn#99363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13203:12834, offset: 0x021c5530, size: 808 bytes, params: 1, frame: 18 let value = environment.__proto__; value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('MESSAGE_CREATE', this.handleMessage); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('MESSAGE_UPDATE', this.handleMessage); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('MESSAGE_DELETE', this.handleMessage); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('SPEAKING', this.handleSpeaking); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('OAUTH2_TOKEN_REVOKE', this.handleOAuth2TokenRevoke); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('GUILD_CREATE', this.handleGuildCreate); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('CHANNEL_CREATE', this.handleChannelCreate); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('LOGOUT', this.handleLogout); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('VOICE_CHANNEL_SELECT', this.handleVoiceChannelSelect); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('RPC_NOTIFICATION_CREATE', this.handleNotificationCreate); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('ACTIVITY_JOIN', this.handleActivityJoin); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('ACTIVITY_LAYOUT_MODE_UPDATE', this.handleActivityLayoutModeUpdate); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('FRAME_UPDATE_LAYOUT_MODE', this.handleFrameUpdateLayoutMode); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('THERMAL_STATE_CHANGE', this.handleThermalStateChange); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('ACTIVITY_SCREEN_ORIENTATION_UPDATE', this.handleScreenOrientationUpdate); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('EMBEDDED_ACTIVITY_UPDATE', this.handleEmbeddedActivityUpdate); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('RELATIONSHIP_ADD', this.handleRelationshipAdd); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('RELATIONSHIP_UPDATE', this.handleRelationshipUpdate); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('RELATIONSHIP_REMOVE', this.handleRelationshipRemove); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('PRESENCE_UPDATES', this.handlePresenceUpdates); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('PRESENCES_REPLACE', this.handlePresencesReplace); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('USER_UPDATE', this.handleUserUpdate); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('ENTITLEMENT_CREATE', this.handleEntitlementCreate); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('ENTITLEMENT_DELETE', this.handleEntitlementDelete); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe('QUESTS_ENROLL_SUCCESS', this.handleQuestEnrollSuccess); } } } global.__d(_fun99302, 13013, [57, 6, 7, 7093, 1379, 1945, 1867, 4259, 4396, 4294, 3793, 1934, 1878, 4297, 661, 4237, 8066, 4291, 1360, 8081, 8095, 13014, 8082, 7116, 477, 694, 683, 566, 2]) /* metro module 13013, dependencies: [57, 6, 7, 7093, 1379, 1945, 1867, 4259, 4396, 4294, 3793, 1934, 1878, 4297, 661, 4237, 8066, 4291, 1360, 8081, 8095, 13014, 8082, 7116, 477, 694, 683, 566, 2] */;