// Module ID: 16974 // Function ID: 16975 // Name: onStageConnectionError // Dependencies: [5, 5344, 6985, 1218, 1372, 1903, 5830, 676, 4368, 1378, 11782, 3, 4002, 1236, 8612, 4159, 1231, 7773, 4311, 5957, 8949, 4158, 15523, 7101, 8783, 5748, 4313, 9242, 698, 4498, 500, 10971, 11, 15521, 6934, 10, 6935, 4994, 12981, 11785, 589, 10960, 9744, 4284, 691, 11087, 8913, 7304, 709, 4509, 1222, 4508, 13197, 2] // Exports: default // Module 16974 (onStageConnectionError) import mergeGuildAvatar from "mergeGuildAvatar"; import scheduledEventSort from "scheduledEventSort"; import fetchFingerprint from "fetchFingerprint"; import ensureGuildLoaded from "ensureGuildLoaded"; import closure_9 from "mergeGuildAvatar"; import { NotificationTypes } from "str2"; import ME from "ME"; import { StreamTypes } from "StreamIssueReportReasons"; import { GuildScheduledEventEntityTypes as closure_16 } from "GUILD_EVENT_MAX_NAME_LENGTH"; import { MultiAccountSwitchLocation as closure_17 } from "MAX_ACCOUNTS"; let closure_12; let closure_14; let map1; let unpackModuleId; const require = arg1; function onStageConnectionError() { let obj = importDefault(4002); obj = { key: "STAGE_DISCOVERY_CONNECTION_ERROR_GENERIC", content: null, icon: null }; const intl = require(1236) /* getSystemLocale */.intl; obj[1] = intl.string(require(1236) /* getSystemLocale */.t.ah3RLk); obj[2] = importDefault(8612); obj.open(obj); } function waitForConnection() { return new Promise((arg0) => { callback(arg0); }); } function waitForDataOrConnection() { const self = this; const apply = _waitForDataOrConnection.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } function _waitForDataOrConnection() { const self = this; let tmp = callback((arg0, arg1) => { let closure_0 = arg0; let closure_1 = arg1; let c3 = 0; let c4 = 0; return (function*(arg0, arg1) { if (c4 === 2) { c4 = 3; HermesBuiltin.throwTypeError(); } else if (tmp4 === 3) { if (arg0 === 1) { throw arg1; } else if (arg0 === 2) { let obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { return { value: "HermesInternal", done: null }; } } else { try { c4 = 2; if (0 === c3) { if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 === 2) { c4 = 3; obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { let c2 = tmp2; c2 = undefined; if (callback()) { c4 = 3; } else { c2 = false; const promise = new Promise((arg0) => { let closure_0 = arg0; const result = closure_0.addConditionalChangeListener(() => { let tmp = !outer1_2; if (!outer1_2) { const tmp3 = outer1_1(); let flag = !tmp3; if (tmp3) { callback(); flag = false; } tmp = flag; } return tmp; }); }); const items = [promise, outer1_20()]; c3 = 1; c4 = 1; const obj1 = { value: null, done: false }; obj1[0] = Promise.race(items); return obj1; } } } else if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 !== 2) { c2 = true; } c4 = 3; obj = { value: null, done: true }; obj[0] = arg1; return obj; } catch (tmp13) { c4 = tmp; throw tmp13; } } })(); }); const _waitForDataOrConnection = tmp; const apply = tmp.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } function waitForNavigationReady() { const self = this; const apply = _waitForNavigationReady.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } function _waitForNavigationReady() { const self = this; const tmp = callback(function*() { if (v0 === 2) { v0 = 3; HermesBuiltin.throwTypeError(); } else if (tmp3 === 3) { if (arg0 === 1) { throw arg1; } else if (arg0 === 2) { let obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { return { value: "HermesInternal", done: null }; } } else { try { v0 = 2; if (0 === c1) { if (arg0 === 1) { v0 = 3; throw arg1; } else if (arg0 === 2) { v0 = 3; obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { const rootNavigationRef = v0(outer1_3[15]).getRootNavigationRef(); let isReadyResult = null != rootNavigationRef; if (isReadyResult) { isReadyResult = rootNavigationRef.isReady(); } if (!isReadyResult) { const promise = new Promise((arg0) => { const v3 = arg0; const ComponentDispatch = v3(table[16]).ComponentDispatch; ComponentDispatch.subscribeOnce(constants.NAVIGATOR_READY, () => { callback(); }); }); c1 = 1; v0 = 1; const obj1 = { value: null, done: false }; obj1[0] = promise; return obj1; } const obj5 = v0(outer1_3[15]); } } else if (arg0 === 1) { v0 = 3; throw arg1; } else if (arg0 === 2) { v0 = 3; obj = { value: null, done: true }; obj[0] = arg1; return obj; } v0 = 3; return { value: "HermesInternal", done: null }; } catch (tmp11) { v0 = tmp; throw tmp11; } } }); const _waitForNavigationReady = tmp; const apply = tmp.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } function _connectToStage() { const self = this; const apply = _connectToStage2.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } function _connectToStage2() { const self = this; const tmp = callback((arg0, arg1) => { let closure_0 = arg0; let closure_1 = arg1; let c6 = 0; let c7 = 0; let c5 = 0; return (function*(arg0, arg1) { const dependencyMap = tmp3; yield outer1_20(); let c5 = 1; const obj2 = callback(7773); yield obj2.connectOrLurkStage(callback, closure_1, true); if (2 === tmp7) { c5 = 0; callback2(); let c7 = 3; } else if (arg0 === 1) { c7 = 3; throw arg1; } else if (arg0 !== 2) { let closure_2 = arg1; const obj = callback(7773); obj.navigateToStage(closure_2, null); c5 = 0; } c5 = 0; return arg1; })(); }); const _connectToStage2 = tmp; const apply = tmp.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } function _handleStageNotification() { const self = this; const tmp = callback((arg0) => { let closure_0 = arg0; let c2 = 0; let c1 = 0; return (function*(arg0) { if (c1 === 2) { c1 = 3; HermesBuiltin.throwTypeError(); } else if (tmp3 === 3) { if (arg0 === 1) { throw arg1; } else if (arg0 === 2) { let obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { return { value: "HermesInternal", done: null }; } } else { try { c1 = 2; if (0 === c2) { if (arg0 === 1) { c1 = 3; throw arg1; } else if (arg0 === 2) { c1 = 3; obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { c2 = 1; c1 = 1; const obj1 = { value: null, done: false }; obj1[0] = outer1_25(closure_0.guild_id, closure_0.channel_id); return obj1; } } else if (arg0 === 1) { c1 = 3; throw arg1; } else if (arg0 === 2) { c1 = 3; obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { c1 = 3; return { value: "HermesInternal", done: null }; } } catch (tmp7) { c1 = tmp; throw tmp7; } } })(); }); const _handleStageNotification = tmp; const apply = tmp.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } function _handleGuildEventNotification() { const self = this; const tmp = callback((arg0) => { let closure_0 = arg0; let c3 = 0; let c4 = 0; return (function*(arg0) { if (c4 === 2) { c4 = 3; HermesBuiltin.throwTypeError(); } else if (tmp5 === 3) { if (arg0 === 1) { throw arg1; } else if (arg0 === 2) { let obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { return { value: "HermesInternal", done: null }; } } else { try { c4 = 2; if (0 === dependencyMap) { if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 === 2) { c4 = 3; obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { let id = tmp2; let guild_scheduled_event_id = tmp3; let channel_id; guild_scheduled_event_id = undefined; id = undefined; const _Number = Number; const NumberResult = Number(channel_id.guild_scheduled_event_entity_type); if (outer1_16.STAGE_INSTANCE === NumberResult) { const channel_id2 = tmp43.channel_id; if (null == channel_id2) { outer1_19(); c4 = 3; c4 = 3; const obj1 = { value: null, done: true }; obj1[0] = arg1; return obj1; } else { dependencyMap = 2; c4 = 1; const obj2 = { value: null, done: false }; obj2[0] = outer1_25(tmp43.guild_id, channel_id2); return obj2; } } else if (tmp46.VOICE === NumberResult) { channel_id = tmp43.channel_id; if (null == channel_id) { (function onVoiceConnectionError() { let obj = guild_scheduled_event_id(4002); obj = { key: "VOICE_CONNECTION_ERROR_GENERIC", content: null, icon: null }; const intl = channel_id(1236).intl; obj[1] = intl.string(channel_id(1236).t.S69lJR); obj[2] = guild_scheduled_event_id(8612); obj.open(obj); })(); c4 = 3; c4 = 3; let obj3 = { value: null, done: true }; obj3[0] = arg1; return obj3; } else { dependencyMap = 3; c4 = 1; const obj4 = { value: null, done: false }; obj4[0] = outer1_20(); return obj4; } } else if (tmp46.EXTERNAL === NumberResult) { guild_scheduled_event_id = tmp43.guild_scheduled_event_id; let obj6 = callback(5957); obj6.transitionToGuild(tmp43.guild_id); dependencyMap = 1; c4 = 1; const obj5 = { value: null, done: false }; obj5[0] = outer1_20(); return obj5; } else { c4 = 3; } } } else if (1 === tmp6) { if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 === 2) { c4 = 3; obj6 = { value: null, done: true }; obj6[0] = arg1; return obj6; } else { id = guildScheduledEvent.getGuildScheduledEvent(guild_scheduled_event_id); if (null != id) { obj3 = channel_id(8949); const obj7 = { eventId: null, event: null }; obj7[0] = id.id; obj7[1] = id; const result = obj3.openGuildEventDetails(obj7); } } } else if (2 === tmp6) { if (arg0 === 1) { c4 = 3; throw arg1; } } else if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 !== 2) { obj = channel_id(4311); obj.transitionToChannel(channel_id); } c4 = 3; return { value: "HermesInternal", done: null }; } catch (tmp31) { c4 = tmp; throw tmp31; } } })(); }); const _handleGuildEventNotification = tmp; const apply = tmp.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } function _handleRelationshipAddNotification() { const self = this; const tmp = callback((arg0) => { let closure_0 = arg0; let c3 = 0; let c4 = 0; return (function*(arg0) { if (c4 === 2) { c4 = 3; HermesBuiltin.throwTypeError(); } else if (tmp4 === 3) { if (arg0 === 1) { throw arg1; } else if (arg0 === 2) { let obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { return { value: "HermesInternal", done: null }; } } else { try { c4 = 2; if (0 === dependencyMap) { if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 === 2) { c4 = 3; obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { let user_id = tmp5; let callback = tmp2; callback = undefined; user_id = undefined; dependencyMap = 1; c4 = 1; const obj1 = { value: null, done: false }; obj1[0] = outer1_23(); return obj1; } } else if (1 === tmp5) { if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 === 2) { c4 = 3; const obj2 = { value: null, done: true }; obj2[0] = arg1; return obj2; } else { const _Number = Number; callback = Number(lib.rel_type); if (callback === constants2.PENDING_INCOMING) { user_id = lib.user_id; lib(4158).navigateToRootTab({ screen: "notifications" }); const obj8 = lib(4158); user_id(15523).setTab(lib(7101).NotificationCenterTabs.ForYou); dependencyMap = 2; c4 = 1; let obj3 = { value: null, done: false }; obj3[0] = callback2(closure_9, () => null != outer1_9.getUser(user_id)); return obj3; } else { if (callback !== constants2.FRIEND) { if (lib.notification_type === constants.REMINDER) { let obj5 = lib(4159); const rootNavigationRef = obj5.getRootNavigationRef(); if (rootNavigationRef != null) { rootNavigationRef.navigate("friends", { screen: "requests" }); } } } else { obj3 = callback(4313); const obj4 = { recipientIds: null }; obj4[0] = lib.user_id; obj3.openPrivateChannel(obj4); } c4 = 3; } } } else if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 === 2) { c4 = 3; obj5 = { value: null, done: true }; obj5[0] = arg1; return obj5; } else { obj = { userId: null, sourceAnalyticsLocations: null }; obj[0] = user_id; const items = [callback(5748).PUSH_NOTIFICATION]; obj[1] = items; callback(8783)(obj); c4 = 3; const obj6 = { value: null, done: true }; obj6[0] = undefined; return obj6; } } catch (tmp45) { c4 = tmp; throw tmp45; } } })(); }); const _handleRelationshipAddNotification = tmp; const apply = tmp.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } function _handleCallRingNotification() { const self = this; const tmp = callback((arg0) => { let closure_0 = arg0; let c3 = 0; let c4 = 0; return (function*(arg0) { if (c4 === 2) { c4 = 3; HermesBuiltin.throwTypeError(); } else if (tmp4 === 3) { if (arg0 === 1) { throw arg1; } else if (arg0 === 2) { let obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { return { value: "HermesInternal", done: null }; } } else { try { c4 = 2; if (0 === table) { if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 === 2) { c4 = 3; obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { let closure_2 = tmp2; let closure_1 = tmp5; table = 1; c4 = 1; const obj1 = { value: null, done: false }; obj1[0] = outer1_21(outer1_8, () => null != outer1_8.getChannel(channel_id.channel_id)); return obj1; } } else if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 === 2) { c4 = 3; const obj2 = { value: null, done: true }; obj2[0] = arg1; return obj2; } else { obj = lib(table[18]); obj.transitionToChannel(lib.channel_id); c4 = 3; return { value: "HermesInternal", done: null }; } } catch (tmp15) { c4 = tmp; throw tmp15; } } })(); }); const _handleCallRingNotification = tmp; const apply = tmp.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } function _handleCallConnectNotification() { const self = this; const tmp = callback((arg0) => { let closure_0 = arg0; let c3 = 0; let c4 = 0; return (function*(arg0) { if (c4 === 2) { c4 = 3; HermesBuiltin.throwTypeError(); } else if (tmp3 === 3) { if (arg0 === 1) { throw arg1; } else if (arg0 === 2) { let obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { return { value: "HermesInternal", done: null }; } } else { try { c4 = 2; if (0 === dependencyMap) { if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 === 2) { c4 = 3; obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { let c2 = 0; const callback = tmp4; dependencyMap = 1; c4 = 1; const obj1 = { value: null, done: false }; obj1[0] = outer1_21(outer1_8, () => null != outer1_8.getChannel(channel_id.channel_id)); return obj1; } } else if (1 === tmp4) { if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 === 2) { c4 = 3; let obj2 = { value: null, done: true }; obj2[0] = arg1; return obj2; } else { lib(4311).transitionToChannel(lib.channel_id); dependencyMap = 2; c4 = 1; let obj3 = { value: null, done: false }; obj3[0] = callback2(); return obj3; } } else if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 === 2) { c4 = 3; let obj4 = { value: null, done: true }; obj4[0] = arg1; return obj4; } else { const tmp60 = callback(9242); const call = tmp60.call; const channel_id = lib.channel_id; if (typeof call === "unknown") { tmp60(false, false); } else { call(channel_id, false, false); } obj = callback(698); const obj5 = { location: null, guild_id: null, ringer_user_id: null }; obj5[0] = callback(5748).PUSH_NOTIFICATION; obj5[1] = lib.guild_id; obj5[2] = lib.user_id; obj2 = lib(4498); const merged = Object.assign(obj2.collectChannelAnalyticsMetadataFromId(lib.channel_id)); obj.track(constants.RING_CALL_ACCEPTED, obj5); obj3 = lib(500); if (obj3.isAndroid()) { if (lib.is_fullscreen_call_ui) { obj4 = callback(698); let obj6 = { action_type: "join" }; obj6 = lib(4498); const merged1 = Object.assign(obj6.collectChannelAnalyticsMetadataFromId(lib.channel_id)); obj4.track(constants.CALLKIT_CLICKED, obj6); } callback(10971)(lib.channel_id); } c4 = 3; return { value: "HermesInternal", done: null }; } } catch (tmp50) { c4 = tmp; throw tmp50; } } })(); }); const _handleCallConnectNotification = tmp; const apply = tmp.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } function _handleFriendSuggestionCreateNotification() { const self = this; const tmp = callback((arg0) => { let closure_0 = arg0; let c3 = 0; let c4 = 0; return (function*(arg0) { if (c4 === 2) { c4 = 3; HermesBuiltin.throwTypeError(); } else if (tmp4 === 3) { if (arg0 === 1) { throw arg1; } else if (arg0 === 2) { let obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { return { value: "HermesInternal", done: null }; } } else { try { c4 = 2; if (0 === dependencyMap) { if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 === 2) { c4 = 3; obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { let user_id = tmp5; let navigation = tmp2; navigation = undefined; user_id = undefined; dependencyMap = 1; c4 = 1; const obj1 = { value: null, done: false }; obj1[0] = outer1_23(); return obj1; } } else if (1 === tmp5) { if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 === 2) { c4 = 3; const obj2 = { value: null, done: true }; obj2[0] = arg1; return obj2; } else { navigation = lib(4159).getRootNavigationRef(); if (null != navigation) { const obj3 = { screen: "add-friends", params: null }; obj3[1] = { sourcePage: "Notifications" }; navigation.navigate("friends", obj3); } user_id = lib.user_id; dependencyMap = 2; c4 = 1; const obj4 = { value: null, done: false }; obj4[0] = callback(closure_9, () => null != outer1_9.getUser(user_id)); return obj4; } } else if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 === 2) { c4 = 3; const obj5 = { value: null, done: true }; obj5[0] = arg1; return obj5; } else { obj = { userId: null, sourceAnalyticsLocations: null }; obj[0] = user_id; const items = [navigation(5748).PUSH_NOTIFICATION]; obj[1] = items; navigation(8783)(obj); c4 = 3; return { value: "HermesInternal", done: null }; } } catch (tmp24) { c4 = tmp; throw tmp24; } } })(); }); const _handleFriendSuggestionCreateNotification = tmp; const apply = tmp.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } function _maybeAckNotificationCenter() { const self = this; const tmp = callback((arg0) => { let closure_0 = arg0; let c3 = 0; let c4 = 0; return (function*(arg0) { if (c4 === 2) { c4 = 3; HermesBuiltin.throwTypeError(); } else if (tmp4 === 3) { if (arg0 === 1) { throw arg1; } else if (arg0 === 2) { let obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { return { value: "HermesInternal", done: null }; } } else { try { c4 = 2; if (0 === dependencyMap) { if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 === 2) { c4 = 3; obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { let closure_2 = tmp5; let prop = tmp2; prop = undefined; closure_2 = undefined; prop = null; if ("notification_center_id" in lib) { prop = tmp38.notification_center_id; } let since = null; if ("since" in lib) { since = tmp38.since; } if ("RELATIONSHIP_ADD" === lib.type) { const _Number = Number; if (Number(tmp38.rel_type) === outer1_13.PENDING_INCOMING) { if (null != since) { dependencyMap = 1; c4 = 1; const obj1 = { value: null, done: false }; obj1[0] = outer1_20(); return obj1; } } } if (null != prop) { dependencyMap = 2; c4 = 1; const obj2 = { value: null, done: false }; obj2[0] = outer1_20(); return obj2; } else { c4 = 3; } } } else if (1 === tmp5) { if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 === 2) { c4 = 3; const obj3 = { value: null, done: true }; obj3[0] = arg1; return obj3; } else { const _Date = Date; const _String = String; const date = new Date(String(lib.since)); closure_2 = prop(11).fromTimestamp(date.getTime()); const obj8 = prop(11); const _HermesInternal = HermesInternal; const items = ["incoming_friend_requests_" + lib.user_id + "_" + closure_2]; const result = lib(15521).markNotificationCenterLocalItemsAcked(items); const obj10 = lib(15521); } } else if (arg0 === 1) { c4 = 3; throw arg1; } else if (arg0 !== 2) { obj = lib(15521); const result1 = obj.markNotificationCenterRemoteItemAcked(prop); } c4 = 3; const obj4 = { value: null, done: true }; obj4[0] = arg1; return obj4; } catch (tmp18) { c4 = tmp; throw tmp18; } } })(); }); const _maybeAckNotificationCenter = tmp; const apply = tmp.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } function receiveNotification_(type) { const _require = type; let obj = _require(10960); const result = obj.initializeRouteManagerIfNeeded(); if ("MESSAGE_CREATE" === type.type) { const _HermesInternal2 = HermesInternal; tmp3.log("Notification clicked of type " + type.type + " with guild:" + type.guild_id + " channel:" + type.channel_id + " message:" + type.message_id); obj = { guildId: null, channelId: null, messageId: null, isPreload: true }; ({ guild_id: obj10[0], channel_id: obj10[1], message_id: obj10[2] } = type); const messages = importDefault(9744).fetchMessages(obj); const obj9 = importDefault(9744); } else { if ("GENERIC_PUSH_NOTIFICATION_SENT" === type.type) { if (null != type.deeplink) { if ("" !== type.deeplink) { const payload = importDefault(4284)(type.deeplink).payload; if (payload.type === tmp(691).LinkingTypes.MESSAGE) { let tracking_type; if (type != null) { tracking_type = type.tracking_type; } if (tracking_type == null) { tracking_type = type.type; } if (tmp8) { tmp(11087).receivedNotification(payload.messageId, payload.channelId, tracking_type); const tmpResult = tmp(11087); } let tmp20Result = tmp20(9744); obj = { guildId: null, channelId: null, messageId: null, isPreload: true }; ({ guildId: obj8[0], channelId: obj8[1], messageId: obj8[2] } = payload); const messages1 = tmp20Result.fetchMessages(obj); tmp8 = null != tracking_type && null != payload.messageId && null != payload.channelId; } else { if (payload.type === tmp(691).LinkingTypes.ICYMI) { if (null != type.channel_id) { if (null != type.message_id) { tmp20Result = tmp20(8913); const forNotification = tmp20Result.fetchForNotification(type.channel_id, type.message_id); } } } if (payload.type === tmp(691).LinkingTypes.ICYMI) { if (null != type.user_id) { if (null != type.notification_center_id) { let status_emoji_id = null; if (null != type.status_emoji_id) { status_emoji_id = null; if ("0" !== type.status_emoji_id) { status_emoji_id = type.status_emoji_id; } } const obj1 = { id: null, type: null, score: 1000, data: null }; obj1[0] = type.notification_center_id; obj1[1] = tmp(7304).ICYMIItemTypes.CUSTOM_STATUS; const obj2 = { user_id: null, text: null, emoji_id: null, emoji_name: null, emoji_animated: null }; ({ user_id: obj3[0], status_text: obj3[1] } = type); obj2[2] = status_emoji_id; obj2[3] = type.status_emoji_name; obj2[4] = type.status_emoji_animated; obj1[3] = obj2; const forStatusNotification = tmp20(8913).fetchForStatusNotification(obj1); const tmp20Result1 = tmp20(8913); } } } } } } } const _HermesInternal = HermesInternal; tmp3.log("Notification clicked of type " + type.type); } } require("processCallbacks").addPostConnectionCallback; ({ AnalyticEvents: unpackModuleId, ComponentActions: closure_12, RelationshipTypes: map1, Routes: closure_14 } = ME); let closure_18 = new require("fetchFingerprint")("receiveNotification"); let tmp3 = new require("fetchFingerprint")("receiveNotification"); let result = require("scheduledEventSort").fileFinishedImporting("modules/push_notifications/native/receiveNotification.tsx"); export default function receiveNotification(getData) { if (null == getData.getData) { return false; } else { data(6934).trackAppOpened("notification"); data = getData.getData(); const obj3 = data(6934); const tmp11 = importDefault; const _HermesInternal = HermesInternal; importDefault(10).mark("\u2757", "Receive notification " + data.type); if (null != data.receiving_user_id) { if (null != id.getId()) { if (data.receiving_user_id !== obj.getId()) { tmp7(6935); tmp7(4994); tmp7(12981); let receiving_user_id = data.receiving_user_id; receiving_user_id = tmp7(11785).switchAccount(receiving_user_id, false, arg1 ? tmp5.PUSH_NOTIFICATION_INITIAL : tmp5.PUSH_NOTIFICATION); receiving_user_id.then(() => { const Emitter = outer1_1(outer1_3[40]).Emitter; Emitter.batched(() => outer1_34(closure_0)); }); const tmp7Result2 = tmp7(11785); } } obj = id; } let Emitter = tmp11(589).Emitter; return Emitter.batched(() => outer1_34(data)); } };