/* Metro module 16229; source: modules/push_notifications/native/receiveNotification.tsx; dependencies: [5, 4255, 4117, 1226, 1379, 1878, 5079, 661, 4286, 1385, 11877, 3, 3857, 1244, 9836, 4008, 1239, 8113, 4601, 6947, 9032, 4007, 14779, 4624, 8743, 6789, 4603, 8916, 683, 4863, 477, 8112, 21, 14777, 4884, 20, 4885, 4257, 11880, 566, 12073, 9597, 4093, 676, 9907, 9580, 7230, 694, 5080, 1230, 8915, 4254, 2] */ function _fun125482(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:6, offset: 0x025da3ce, size: 569 bytes, params: 8, frame: 19 const env0_0 = require; const onStageConnectionError = function() { var defaultImport = importDefault(dependencyMap[12]); var object = {key: 'STAGE_DISCOVERY_CONNECTION_ERROR_GENERIC'}; object.content = require(dependencyMap[13]).intl.string(require(dependencyMap[13]).t.ah3RLk); object.icon = importDefault(dependencyMap[14]); defaultImport.open(object); }; const waitForConnection = function() { var Promise = global.Promise; var value = Object.create(Promise.prototype, {constructor: {value: Promise}}); var value2 = new Promise(_fun125485); return value2 instanceof Object ? value2 : value; }; const waitForDataOrConnection = function() { return _waitForDataOrConnection.apply(this, arguments); }; const waitForNavigationReady = function() { return _waitForNavigationReady.apply(this, arguments); }; const _connectToStage = function() { return _connectToStage2.apply(this, arguments); }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_4 = importDefault(5) /* metro dependency 5 */; const env0_5 = (require(4255) /* metro dependency 4255: PostConnectionCallbackStore */).addPostConnectionCallback; const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */; const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; const env0_10 = (require(5079) /* metro dependency 5079: PushNotificationConstants */).NotificationTypes; let value = require(661) /* metro dependency 661: Constants */; const env0_11 = value.AnalyticEvents; const env0_12 = value.ComponentActions; const env0_13 = value.RelationshipTypes; const env0_14 = value.Routes; const env0_15 = (require(4286) /* metro dependency 4286: Constants */).StreamTypes; const env0_16 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventEntityTypes; const env0_17 = (require(11877) /* metro dependency 11877: Constants */).MultiAccountSwitchLocation; value = importDefault(3) /* metro dependency 3: Logger */; value = new value('receiveNotification'); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/push_notifications/native/receiveNotification.tsx'); exports.default = receiveNotification; } function waitForConnection() { // fn#125484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:593, offset: 0x025da682, size: 39 bytes, params: 1, frame: 11 const Promise = global.Promise; const value = Object.create(Promise.prototype, {constructor: {value: Promise}}); const promise = new Promise(function(a0) { addPostConnectionCallback(a0); }); return promise instanceof Object ? promise : value; } function _waitForDataOrConnection() { // fn#125487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:743, offset: 0x025da6a9, size: 50 bytes, params: 1, frame: 14 return env0_4(_fun125489).apply(this, arguments); } function _waitForNavigationReady() { // fn#125493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:1095, offset: 0x025da7ce, size: 50 bytes, params: 1, frame: 14 return env0_4(_fun125495).apply(this, arguments); } function _connectToStage2() { // fn#125499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:1435, offset: 0x025da8ca, size: 50 bytes, params: 1, frame: 14 return env0_4(_fun125501).apply(this, arguments); } function _handleStageNotification() { // fn#125502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:1677, offset: 0x025da998, size: 50 bytes, params: 1, frame: 14 return env0_4(_fun125504).apply(this, arguments); } function _handleGuildEventNotification() { // fn#125505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:1834, offset: 0x025daa0b, size: 50 bytes, params: 1, frame: 14 return env0_4(_fun125507).apply(this, arguments); } function _handleRelationshipAddNotification() { // fn#125508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:2630, offset: 0x025dac23, size: 50 bytes, params: 1, frame: 14 return env0_4(_fun125510).apply(this, arguments); } function _handleCallRingNotification() { // fn#125512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:3303, offset: 0x025dae36, size: 50 bytes, params: 1, frame: 14 return env0_4(_fun125514).apply(this, arguments); } function _handleCallConnectNotification() { // fn#125516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:3534, offset: 0x025daef9, size: 50 bytes, params: 1, frame: 14 return env0_4(_fun125518).apply(this, arguments); } function _handleFriendSuggestionCreateNotification() { // fn#125520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:4206, offset: 0x025db0ea, size: 50 bytes, params: 1, frame: 14 return env0_4(_fun125522).apply(this, arguments); } function _maybeAckNotificationCenter() { // fn#125524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:4658, offset: 0x025db218, size: 50 bytes, params: 1, frame: 14 return env0_4(_fun125526).apply(this, arguments); } function receiveNotification_(a0) { // fn#125527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:5227, offset: 0x025db3bf, size: 1058 bytes, params: 2, frame: 31 var status_emoji_id; var tracking_type; var r11; var r7; var r0; var deeplink; var value4; var payload; const LinkingTypes = (require(676) /* metro dependency 676: ConstantsIOS */).LinkingTypes; var channel_id; var message_id; const ICYMIItemTypes = (require(7230) /* metro dependency 7230: ICYMITypes */).ICYMIItemTypes; var defaultImport3; var moduleValue2; var defaultImport4; var fetchMessages; var value8; var binding; var log; var guild_id; var value9; const env0_0 = a0; var value; const value2 = undefined; (require(12073) /* metro dependency 12073: RouteManagerUtils */).initializeRouteManagerIfNeeded(); const value3 = false; let type = a0.type; if (type === 'MESSAGE_CREATE') { binding = env0_18; log = binding.log; type = a0.type; guild_id = a0.guild_id; channel_id = a0.channel_id; message_id = a0.message_id; Reflect.apply(log, binding, ['Notification clicked of type ' + type + ' with guild:' + guild_id + ' channel:' + channel_id + ' message:' + message_id]); value = importDefault(9597) /* metro dependency 9597: MessageManager */; fetchMessages = value.fetchMessages; guild_id = a0.guild_id; channel_id = a0.channel_id; message_id = a0.message_id; value9 = true; Reflect.apply(fetchMessages, value, [{guildId: guild_id, channelId: channel_id, messageId: message_id, isPreload: value9}]); r0 = value9; } else { type = a0.type; if (type !== 'GENERIC_PUSH_NOTIFICATION_SENT') { r0 = value3; } else { deeplink = a0.deeplink; value4 = null; if (value4 != deeplink) { if (a0.deeplink === '') { r0 = value3; } else { payload = (importDefault(4093) /* metro dependency 4093: parseURL */)(a0.deeplink).payload; if (payload.type === LinkingTypes.MESSAGE) { tracking_type = value4 == a0 ? value2 : a0.tracking_type; r11 = value4 != tracking_type ? tracking_type : a0.type; r7 = value4 != r11 && value4 != payload.messageId; r7 = r7 && value4 != payload.channelId; if (r7) { moduleValue2 = require(9907) /* metro dependency 9907: PushFeedbackActions */; moduleValue2.receivedNotification(payload.messageId, payload.channelId, r11); } defaultImport4 = importDefault(9597) /* metro dependency 9597: MessageManager */; value8 = true; defaultImport4.fetchMessages({guildId: payload.guildId, channelId: payload.channelId, messageId: payload.messageId, isPreload: value8}); r0 = value8; } else if (payload.type !== LinkingTypes.ICYMI) { if (payload.type !== LinkingTypes.ICYMI) { r0 = value3; } else if (value4 != a0.user_id) { if (value4 != a0.notification_center_id) { status_emoji_id = a0.status_emoji_id; if (value4 != status_emoji_id) { status_emoji_id = a0.status_emoji_id; status_emoji_id = status_emoji_id === '0' ? value4 : a0.status_emoji_id; } else { status_emoji_id = value4; } (importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).fetchForStatusNotification({id: a0.notification_center_id, type: ICYMIItemTypes.CUSTOM_STATUS, score: 1000, data: {user_id: a0.user_id, text: a0.status_text, emoji_id: status_emoji_id, emoji_name: a0.status_emoji_name, emoji_animated: !!a0.status_emoji_animated}}); r0 = value3; } else { r0 = value3; } } else { r0 = value3; } } else if (value4 == a0.channel_id) { if (payload.type !== LinkingTypes.ICYMI) { r0 = value3; } else if (value4 != a0.user_id) { if (value4 != a0.notification_center_id) { status_emoji_id = a0.status_emoji_id; if (value4 != status_emoji_id) { status_emoji_id = a0.status_emoji_id; status_emoji_id = status_emoji_id === '0' ? value4 : a0.status_emoji_id; } else { status_emoji_id = value4; } (importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).fetchForStatusNotification({id: a0.notification_center_id, type: ICYMIItemTypes.CUSTOM_STATUS, score: 1000, data: {user_id: a0.user_id, text: a0.status_text, emoji_id: status_emoji_id, emoji_name: a0.status_emoji_name, emoji_animated: !!a0.status_emoji_animated}}); r0 = value3; } else { r0 = value3; } } else { r0 = value3; } } else if (value4 != a0.message_id) { defaultImport3 = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */; defaultImport3.fetchForNotification(a0.channel_id, a0.message_id); r0 = value3; } else if (payload.type !== LinkingTypes.ICYMI) { r0 = value3; } else if (value4 != a0.user_id) { if (value4 != a0.notification_center_id) { status_emoji_id = a0.status_emoji_id; if (value4 != status_emoji_id) { status_emoji_id = a0.status_emoji_id; status_emoji_id = status_emoji_id === '0' ? value4 : a0.status_emoji_id; } else { status_emoji_id = value4; } (importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).fetchForStatusNotification({id: a0.notification_center_id, type: ICYMIItemTypes.CUSTOM_STATUS, score: 1000, data: {user_id: a0.user_id, text: a0.status_text, emoji_id: status_emoji_id, emoji_name: a0.status_emoji_name, emoji_animated: !!a0.status_emoji_animated}}); r0 = value3; } else { r0 = value3; } } else { r0 = value3; } } } else { r0 = value3; } } binding = env0_18; log = binding.log; type = a0.type; Reflect.apply(log, binding, ['Notification clicked of type ' + type]); } type = a0.type; if (type === 'MESSAGE_CREATE') { receiveNotification_Dispatch(); } else { if (type === 'FORUM_THREAD_CREATED') { receiveNotification_Dispatch(); return r0; } if (type === 'RELATIONSHIP_ADD') { receiveNotification_Dispatch(); return r0; } if (type === 'CALL_RING') { receiveNotification_Dispatch(); return r0; } if (type === 'CALL_CONNECT') { receiveNotification_Dispatch(); return r0; } if (type === 'FRIEND_SUGGESTION_CREATE') { receiveNotification_Dispatch(); return r0; } if (type === 'STAGE_INSTANCE_CREATE') { receiveNotification_Dispatch(); return r0; } if (type === 'GUILD_SCHEDULED_EVENT_UPDATE') { receiveNotification_Dispatch(); return r0; } if (type === 'GUILD_STREAM_START') { receiveNotification_Dispatch(); return r0; } if (type === 'GENERIC_PUSH_NOTIFICATION_SENT') { receiveNotification_Dispatch(); return r0; } } return r0; } function receiveNotification(a0) { // fn#125537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:9622, offset: 0x025dbe07, size: 333 bytes, params: 2, frame: 20 var r0; var moduleValue2; const getData = a0.getData; if (getData == null) { return false; } var value; (require(4884) /* metro dependency 4884: TTIAnalyticsUtils */).trackAppOpened('notification'); const data = a0.getData(); const defaultImport = importDefault(20) /* metro dependency 20: AppStartPerformance */; defaultImport.mark('❗', 'Receive notification ' + data.type); if (data.receiving_user_id == null) { r0 = (importDefault(566) /* metro dependency 566: flux */).Emitter.batched(_fun125540); } else if (AuthenticationStore.getId() == null) { r0 = (importDefault(566) /* metro dependency 566: flux */).Emitter.batched(_fun125540); } else if (data.receiving_user_id !== AuthenticationStore.getId()) { require(4885) /* metro dependency 4885: CacheStore */; require(4257) /* metro dependency 4257: GatewayConnectionStore */; moduleValue2 = require(11880) /* metro dependency 11880: MultiAccountActionCreators */; value = moduleValue2.switchAccount(data.receiving_user_id, false, MultiAccountSwitchLocation.PUSH_NOTIFICATION); value.then(function() { var Emitter = importDefault(dependencyMap[39]).Emitter; Emitter.batched(_fun125539); }); value = true; r0 = value; } else { r0 = (importDefault(566) /* metro dependency 566: flux */).Emitter.batched(_fun125540); } return r0; } function* _fun125489(a0, a1) { // fn#125489, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:814, offset: 0x025da6e6, size: 147 bytes, params: 3, frame: 16 if (true) { var env0_0 = a0; var env0_1 = a1; if (!a1()) { var Promise = global.Promise; var promise = new Promise(function(a0) { a0.addConditionalChangeListener(_fun125491); }); var value4 = env2_20(); Promise = global.Promise; yield Promise.race([promise, value4]); promise = undefined; if (false) { return promise; } } } } function* _fun125495() { // fn#125495, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:1164, offset: 0x025da80b, size: 120 bytes, params: 1, frame: 13 var environment; var r2; if (true) { value = environment.__proto__.__proto__; value = env2_0(env2_3[15]); value = value.getRootNavigationRef(); var value3 = value != null; if (value3) { value = value.isReady(); r2 = value; } else { r2 = value3; } if (r2) { return undefined; } var Promise = global.Promise; yield new Promise(_fun125496); } } function* _fun125501(a0, a1) { // fn#125501, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:1490, offset: 0x025da907, size: 145 bytes, params: 3, frame: 20 var binding; var binding2; var property; var value5; var connectOrLurkStage; var value6; var value7; var value8; var binding3; var value9; var navigateToStage; var error; if (true) { value = environment.__proto__.__proto__; yield env2_20(); if (false) { return undefined; } reducibleJoin4: while (true) { reduciblePort23: while (true) { exceptionLanding22: while (true) { try { binding = env2_0; } catch (error) { break exceptionLanding22; } break reducibleJoin4; } env2_19(); break reduciblePort23; } return undefined; } try { binding2 = env2_3; } catch (error) { break exceptionLanding22; } try { property = binding2[17]; } catch (error) { break exceptionLanding22; } try { value5 = binding(property); } catch (error) { break exceptionLanding22; } try { connectOrLurkStage = value5.connectOrLurkStage; } catch (error) { break exceptionLanding22; } try { value6 = Reflect.apply(connectOrLurkStage, value5, [a0, a1, true]); } catch (error) { break exceptionLanding22; } yield value6; try { value7 = undefined; value8 = false; } catch (error) { break exceptionLanding22; } if (value8) { return value7; } try { binding = env2_0; } catch (error) { break exceptionLanding22; } try { binding3 = env2_3; } catch (error) { break exceptionLanding22; } try { property = binding3[17]; } catch (error) { break exceptionLanding22; } try { value9 = binding(property); } catch (error) { break exceptionLanding22; } try { navigateToStage = value9.navigateToStage; } catch (error) { break exceptionLanding22; } try { Reflect.apply(navigateToStage, value9, [value7, null]); } catch (error) { break exceptionLanding22; } } } function* _fun125504({guild_id, channel_id}) { // fn#125504, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:1748, offset: 0x025da9d5, size: 54 bytes, params: 2, frame: 14 if (true) { value = environment.__proto__.__proto__; yield env2_25(guild_id, channel_id); } } function* _fun125507(a0) { // fn#125507, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:1915, offset: 0x025daa48, size: 475 bytes, params: 2, frame: 23 var guild_id; var binding; var object2; var channel_id; var binding2; var open; var binding3; var intl; if (true) { var Number = global.Number; value = Number(a0.guild_scheduled_event_entity_type); var STAGE_INSTANCE = env2_16.STAGE_INSTANCE; if (STAGE_INSTANCE === value) { channel_id = a0.channel_id; if (channel_id == null) { env2_19(); return undefined; } yield env2_25(a0.guild_id, channel_id); return undefined; } var VOICE = env2_16.VOICE; if (VOICE === value) { channel_id = a0.channel_id; if (channel_id == null) { binding = env2_1; binding2 = env2_3; value = binding(binding2[12]); open = value.open; object2 = {key: 'VOICE_CONNECTION_ERROR_GENERIC'}; binding3 = env2_0; intl = binding3(binding2[13]).intl; object2.content = intl.string(binding3(binding2[13]).t.S69lJR); object2.icon = binding(binding2[14]); Reflect.apply(open, value, [object2]); return undefined; } yield env2_20(); value = undefined; if (false) { return value; } binding = env2_0; value = binding(env2_3[18]); value.transitionToChannel(channel_id); } else { var EXTERNAL = env2_16.EXTERNAL; if (EXTERNAL !== value) { return undefined; } guild_id = a0.guild_id; var guild_scheduled_event_id = a0.guild_scheduled_event_id; binding = env2_0; value = binding(env2_3[19]); value.transitionToGuild(guild_id); yield env2_20(); value = undefined; if (false) { return value; } binding = env2_6; value = binding.getGuildScheduledEvent(guild_scheduled_event_id); if (value == null) { return undefined; } binding = env2_0; binding(env2_3[20]).openGuildEventDetails({eventId: value.id, event: value}); } } } function* _fun125510(a0) { // fn#125510, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:2721, offset: 0x025dac60, size: 437 bytes, params: 2, frame: 21 var environment; var binding; var object2; var user_id; var binding2; var value7; var binding5; if (true) { value = environment.__proto__.__proto__; yield env2_23(); if (false) { return undefined; } var Number = global.Number; var value5 = Number(a0.rel_type); var PENDING_INCOMING = env2_13.PENDING_INCOMING; if (value5 === PENDING_INCOMING) { user_id = a0.user_id; binding = env2_0; binding2 = env2_3; binding(binding2[21]).navigateToRootTab({screen: 'notifications'}); value7 = env2_2(binding2[22]); value7.setTab(binding(binding2[23]).NotificationCenterTabs.ForYou); binding = env2_21; yield binding(env2_9, _fun125511); if (false) { return undefined; } binding = env2_1; binding5 = env2_3; value = binding(binding5[24]); object2 = {userId: user_id}; object2.sourceAnalyticsLocations = [binding(binding5[25]).PUSH_NOTIFICATION]; value(object2); } else { var FRIEND = env2_13.FRIEND; if (value5 !== FRIEND) { if (a0.notification_type === env2_10.REMINDER) { value = env2_0(env2_3[15]); value = value.getRootNavigationRef(); if (value != null) { value.navigate('friends', {screen: 'requests'}); } } } else { env2_1(env2_3[26]).openPrivateChannel({recipientIds: a0.user_id}); } } } } function* _fun125514(a0) { // fn#125514, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:3380, offset: 0x025dae73, size: 97 bytes, params: 2, frame: 16 var environment; if (true) { var env0_0 = a0; value = environment.__proto__.__proto__; yield env2_21(env2_8, _fun125515); if (false) { return undefined; } value = env2_0(env2_3[18]); value.transitionToChannel(a0.channel_id); } } function* _fun125518(a0) { // fn#125518, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:3617, offset: 0x025daf36, size: 436 bytes, params: 2, frame: 27 var environment; var binding4; var value12; var CALLKIT_CLICKED; var value13; if (true) { var env0_0 = a0; value = environment.__proto__.__proto__; var binding = env2_21; yield binding(env2_8, _fun125519); if (false) { return undefined; } var value5 = env2_0(env2_3[18]); value5.transitionToChannel(a0.channel_id); yield env2_20(); if (false) { return undefined; } binding = env2_1; var binding3 = env2_3; var value8 = binding(binding3[27]); value8.call(a0.channel_id, false, false); var value9 = binding(binding3[28]); var track = value9.track; var RING_CALL_ACCEPTED = env2_11.RING_CALL_ACCEPTED; var object2 = {}; var PUSH_NOTIFICATION = binding(binding3[25]).PUSH_NOTIFICATION; object2.location = PUSH_NOTIFICATION; object2.guild_id = a0.guild_id; var user_id = a0.user_id; object2.ringer_user_id = user_id; binding = env2_0; var value10 = binding(binding3[29]); copyDataProperties(object2, value10.collectChannelAnalyticsMetadataFromId(a0.channel_id), undefined); Reflect.apply(track, value9, [RING_CALL_ACCEPTED, object2]); var value11 = binding(binding3[30]); if (value11.isAndroid()) { if (a0.is_fullscreen_call_ui) { binding = env2_1; binding4 = env2_3; value12 = binding(binding4[28]); track = value12.track; CALLKIT_CLICKED = env2_11.CALLKIT_CLICKED; object2 = {action_type: 'join'}; binding = env2_0; value13 = binding(binding4[29]); copyDataProperties(object2, value13.collectChannelAnalyticsMetadataFromId(a0.channel_id), undefined); Reflect.apply(track, value12, [CALLKIT_CLICKED, object2]); } binding = env2_1; binding(env2_3[31])(a0.channel_id); } } } function* _fun125522({user_id}) { // fn#125522, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:4311, offset: 0x025db127, size: 241 bytes, params: 2, frame: 19 var environment; var object2; if (true) { value = environment.__proto__.__proto__; yield env2_23(); if (false) { return undefined; } var binding = env2_0; var rootNavigationRef = binding(env2_3[15]).getRootNavigationRef(); if (rootNavigationRef != null) { rootNavigationRef.navigate('friends', {screen: 'add-friends', params: {sourcePage: 'Notifications'}}); } yield env2_21(env2_9, _fun125523); if (false) { return undefined; } binding = env2_1; var binding3 = env2_3; value = binding(binding3[24]); object2 = {userId: user_id}; var PUSH_NOTIFICATION = binding(binding3[25]).PUSH_NOTIFICATION; object2.sourceAnalyticsLocations = [PUSH_NOTIFICATION]; value(object2); } } function* _fun125526(a0) { // fn#125526, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:4735, offset: 0x025db255, size: 362 bytes, params: 2, frame: 22 var binding; var binding2; var fromTimestamp; var Date; var value8; var date; var value11; var markNotificationCenterLocalItemsAcked; if (true) { var notification_center_id = 'notification_center_id' in a0 ? a0.notification_center_id : null; if (a0.type !== 'RELATIONSHIP_ADD') { if (value == notification_center_id) { return undefined; } value = environment.__proto__.__proto__; yield env2_20(); if (false) { return undefined; } value = env2_0(env2_3[33]); value.markNotificationCenterRemoteItemAcked(notification_center_id); } else { var Number = global.Number; var value3 = Number(a0.rel_type); var PENDING_INCOMING = env2_13.PENDING_INCOMING; if (value3 !== PENDING_INCOMING) { if (value == notification_center_id) { return undefined; } value = environment.__proto__.__proto__; yield env2_20(); if (false) { return undefined; } value = env2_0(env2_3[33]); value.markNotificationCenterRemoteItemAcked(notification_center_id); return undefined; } if (value != ('since' in a0 ? a0.since : value)) { yield env2_20(); value = undefined; if (false) { return value; } binding = env2_1; binding2 = env2_3; value = binding(binding2[32]); fromTimestamp = value.fromTimestamp; Date = global.Date; value8 = global.String(a0.since); date = new Date(); value = Reflect.apply(fromTimestamp, value, [date.getTime()]); binding = env2_0; value11 = binding(binding2[33]); markNotificationCenterLocalItemsAcked = value11.markNotificationCenterLocalItemsAcked; value = 'incoming_friend_requests_' + a0.user_id + '_' + value; Reflect.apply(markNotificationCenterLocalItemsAcked, value11, [[value]]); return undefined; } if (value == notification_center_id) { return undefined; } value = environment.__proto__.__proto__; yield env2_20(); if (false) { return undefined; } binding = env2_0; value = binding(env2_3[33]); value.markNotificationCenterRemoteItemAcked(notification_center_id); } } } function receiveNotification_Dispatch() { // fn#125528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:6924, owner: receiveNotification_.dispatch, offset: 0x025db7e1, size: 1308 bytes, params: 1, frame: 23 var object2; var environment; var message; var payload; var defaultImport3; var defaultImport4; var moduleValue; var transitionTo; var CHANNEL; let value = environment.__proto__; (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'PUSH_NOTIFICATION_CLICK'}); const defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */; const track = defaultImport2.track; const NOTIFICATION_CLICKED = AnalyticEvents.NOTIFICATION_CLICKED; object2 = {}; const value3 = 'tracking_type' in env0_0; let binding = env0_0; object2.notif_type = value3 ? binding.tracking_type : binding.type; const value4 = null; const user_id = 'user_id' in env0_0 ? env0_0.user_id : value4; object2.notif_user_id = user_id; object2.message_id = 'message_id' in env0_0 ? env0_0.message_id : value4; object2.message_type = 'message_type_' in env0_0 ? env0_0.message_type_ : value4; object2.has_message = 'message' in env0_0 && value4 != env0_0.message; object2.guild_id = 'guild_id' in env0_0 ? env0_0.guild_id : value4; object2.channel_id = 'channel_id' in env0_0 ? env0_0.channel_id : value4; object2.channel_type = 'channel_type' in env0_0 ? env0_0.channel_type : value4; object2.rel_type = 'rel_type' in env0_0 ? global.Number(env0_0.rel_type) : value4; object2.notification_id = 'notification_id' in env0_0 ? env0_0.notification_id : value4; object2.has_image_thumbnail = 'image_url' in env0_0 && value4 != env0_0.image_url; object2.join_id = 'join_id' in env0_0 ? env0_0.join_id : value4; object2.notif_instance_id = 'notif_instance_id' in env0_0 ? env0_0.notif_instance_id : value4; object2.notif_type_id = 'notif_type_id' in env0_0 ? env0_0.notif_type_id : value4; object2.mention_type = 'mention_type' in env0_0 ? env0_0.mention_type : value4; Reflect.apply(track, defaultImport2, [NOTIFICATION_CLICKED, object2]); binding = env0_0; (function() { return _maybeAckNotificationCenter.apply(this, arguments); })(binding); const type = binding.type; if (type === 'MESSAGE_CREATE') { message = env0_0.message; if (value4 != message) { defaultImport4 = importDefault(694) /* metro dependency 694: Dispatcher */; dispatch = defaultImport4.dispatch; object2 = {'type': 'MESSAGE_CREATE', 'channelId': null, 'message': null, 'optimistic': true, 'isPushNotification': true}; binding = env0_0; message = binding.message; object2.channelId = message.channel_id; message = binding.message; object2.message = message; Reflect.apply(dispatch, defaultImport4, [object2]); } (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popAll(); moduleValue = require(1230) /* metro dependency 1230: router_utils */; transitionTo = moduleValue.transitionTo; CHANNEL = Routes.CHANNEL; binding = env0_0; Reflect.apply(transitionTo, moduleValue, [Reflect.apply(CHANNEL, Routes, [binding.guild_id, binding.channel_id, binding.message_id]), {'navigationReplace': true, 'openChannel': true, skipMessageFetch: env0_1}]); } else if (type === 'FORUM_THREAD_CREATED') { waitForConnection().then(_fun125530); } else if (type === 'RELATIONSHIP_ADD') { (function() { return _handleRelationshipAddNotification.apply(this, arguments); })(env0_0); } else if (type === 'CALL_RING') { (function() { return _handleCallRingNotification.apply(this, arguments); })(env0_0); } else if (type === 'CALL_CONNECT') { (function() { return _handleCallConnectNotification.apply(this, arguments); })(env0_0); } else if (type === 'FRIEND_SUGGESTION_CREATE') { (function() { return _handleFriendSuggestionCreateNotification.apply(this, arguments); })(env0_0); } else if (type === 'GUILD_STREAM_START') { defaultImport3 = importDefault(8915) /* metro dependency 8915: transitionToStreamNative */; binding = env0_0; defaultImport3({streamType: StreamTypes.GUILD, ownerId: binding.user_id, guildId: binding.guild_id, channelId: binding.channel_id}); } else if (type === 'GUILD_SCHEDULED_EVENT_UPDATE') { (function() { return _handleGuildEventNotification.apply(this, arguments); })(env0_0); } else if (type === 'STAGE_INSTANCE_CREATE') { (function() { return _handleStageNotification.apply(this, arguments); })(env0_0); } else if (type === 'GENERIC_PUSH_NOTIFICATION_SENT') { if (value4 != env0_0.deeplink) { if (env0_0.deeplink !== '') { value = importDefault(4093) /* metro dependency 4093: parseURL */; payload = value(env0_0.deeplink).payload; value = importDefault(4254) /* metro dependency 4254: handleSupportedURL */; value({payload: payload, waitForConnection: false, skipMessageFetch: env0_1}); } } } } function _fun125538() { // fn#125538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:9969, offset: 0x025dbf54, size: 53 bytes, params: 1, frame: 12 const Emitter = (importDefault(566) /* metro dependency 566: flux */).Emitter; Emitter.batched(_fun125539); } function _fun125540() { // fn#125540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:10063, offset: 0x0106aa04, size: 23 bytes, params: 1, frame: 11 return receiveNotification_(env0_0); } function _fun125490(a0) { // fn#125490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:862, offset: 0x025da779, size: 38 bytes, params: 2, frame: 11 a0.addConditionalChangeListener(_fun125491); } function _fun125496(a0) { // fn#125496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:1256, offset: 0x025da883, size: 71 bytes, params: 2, frame: 14 const env0_0 = a0; const ComponentDispatch = env3_0(env3_3[16]).ComponentDispatch; const subscribeOnce = ComponentDispatch.subscribeOnce; const NAVIGATOR_READY = env3_12.NAVIGATOR_READY; Reflect.apply(subscribeOnce, ComponentDispatch, [NAVIGATOR_READY, _fun125497]); } function _fun125511() { // fn#125511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:2984, offset: 0x025dae15, size: 33 bytes, params: 1, frame: 11 const value = environment.__proto__.__proto__.__proto__; const binding = env3_9; const getUser = binding.getUser; return Reflect.apply(getUser, binding, [user_id]) != null; } function _fun125515() { // fn#125515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:3426, offset: 0x025daed4, size: 37 bytes, params: 1, frame: 11 const value = environment.__proto__.__proto__.__proto__; const binding = env3_8; const getChannel = binding.getChannel; return Reflect.apply(getChannel, binding, [env0_0.channel_id]) != null; } function _fun125530() { // fn#125530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:8275, offset: 0x025dbd1b, size: 86 bytes, params: 1, frame: 16 let value = environment.__proto__.__proto__; const router_utilsModule = require(1230) /* metro dependency 1230: router_utils */; const transitionTo = router_utilsModule.transitionTo; const CHANNEL = Routes.CHANNEL; value = environment.__proto__; const binding = env1_0; Reflect.apply(transitionTo, router_utilsModule, [Reflect.apply(CHANNEL, Routes, [binding.guild_id, binding.channel_id]), {'navigationReplace': true, 'openChannel': true}]); } function _fun125539() { // fn#125539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:10000, offset: 0x025dbf89, size: 23 bytes, params: 1, frame: 11 return receiveNotification_(env1_0); } function _fun125491() { // fn#125491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16437:898, offset: 0x025da79f, size: 47 bytes, params: 1, frame: 11 var r1; var r0; let value = environment.__proto__; const binding = env1_2; if (binding) { r0 = !binding; } else { value = require(); if (value) { env0_0(); r1 = false; } else { r1 = !value; } r0 = r1; } return r0; }