/* Metro module 10905; source: stores/native/InAppNotificationStore.tsx; dependencies: [15, 17, 18, 6, 7, 1378, 4606, 10906, 6611, 5116, 1348, 1379, 1867, 10907, 4605, 1934, 1373, 1878, 661, 8277, 8275, 3738, 22, 10908, 10910, 5087, 5216, 10911, 10684, 4625, 10919, 672, 10920, 10921, 10915, 10923, 10927, 4246, 10928, 3829, 1314, 10929, 5188, 10930, 4863, 21, 566, 694, 2] */ function _fun83470(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:6, offset: 0x01f1bf38, size: 923 bytes, params: 8, frame: 21 const env0_0 = require; const _arrayLikeToArray_83476 = 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 closure = GUILD_UPDATE_83477; const closure2 = ENQUEUE_IN_APP_NOTIFICATION; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(15) /* metro dependency 15 */; const env0_4 = importDefault(17) /* metro dependency 17 */; const env0_5 = importDefault(18) /* metro dependency 18 */; const env0_6 = importDefault(6) /* metro dependency 6 */; const env0_7 = importDefault(7) /* metro dependency 7 */; const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */; const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */; const guildIncidentsStore = importDefault(10906) /* metro dependency 10906: GuildIncidentsStore */; const env0_11 = (require(6611) /* metro dependency 6611: LastMentionTimestampStore */).trackMessageNotificationTimestamps; let value = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */; const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */; const notificationSettingsStore = importDefault(10907) /* metro dependency 10907: NotificationSettingsStore */; const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */; const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */; const userRequiredActionStore = importDefault(1373) /* metro dependency 1373: UserRequiredActionStore */; const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; const constantsModule = require(661) /* metro dependency 661: Constants */; const env0_21 = constantsModule.AnalyticEvents; const env0_22 = constantsModule.ChannelTypes; const env0_23 = constantsModule.InAppNotificationTypes; const env0_24 = constantsModule.MessageTypesSets; let value5 = new _fun83484()(); const value9 = new _fun83489()(); const env0_28 = value.isCurrentUserInRestrictedHours(); let env0_30 = (require(10908) /* metro dependency 10908: RestrictedScheduleNotificationUtils */).EMPTY_SCHEDULE_SNAPSHOT; const Store = (importDefault(566) /* metro dependency 566: flux */).Store; _fun83495(Store).displayName = 'InAppNotificationStore'; value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {POST_CONNECTION_OPEN: function() { env0_29 = true; env0_30 = require(dependencyMap[23]).toScheduleSnapshot(getCurrentRestrictedSchedule()); GUILD_UPDATE_83477(); }, LOGOUT: LOGOUT_83500, GUILD_UPDATE: closure, MESSAGE_CREATE: MESSAGE_CREATE_83502, MESSAGE_ACK: MESSAGE_ACK_83504, REACTION_NOTIFICATION_SENT: REACTION_NOTIFICATION_SENT, MESSAGE_REMINDER_DUE: MESSAGE_REMINDER_DUE, RESTRICTED_HOURS_WARNING: RESTRICTED_HOURS_WARNING, RESTRICTED_HOURS_STATE_CHANGE: RESTRICTED_HOURS_STATE_CHANGE, THREAD_CREATE: THREAD_CREATE_83515, CLEAR_IN_APP_NOTIFICATION: function() { env0_26 = null; showNextNotification(); }, ENQUEUE_IN_APP_NOTIFICATION: closure2, CHANNEL_SELECT: CHANNEL_SELECT_83518, CHANNEL_RTC_UPDATE_CHAT_OPEN: CHANNEL_RTC_UPDATE_CHAT_OPEN_83520, USER_SETTINGS_PROTO_UPDATE: USER_SETTINGS_PROTO_UPDATE_83522, CURRENT_USER_UPDATE: CURRENT_USER_UPDATE_83524}); (require(2) /* metro dependency 2 */).fileFinishedImporting('stores/native/InAppNotificationStore.tsx'); exports.default = value; } function _isNativeReflectConstruct_83471() { // fn#83471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:420, offset: 0x01f1c2d3, size: 98 bytes, params: 1, frame: 18 var Boolean; var prototype; var valueOf; var call; var Reflect; var construct; var closure; var value; var error; try { Boolean = global.Boolean; prototype = Boolean.prototype; valueOf = prototype.valueOf; call = valueOf.call; Reflect = global.Reflect; construct = Reflect.construct; Boolean = global.Boolean; closure = function() { }; value = Reflect.apply(construct, Reflect, [Boolean, [], closure]); value = Reflect.apply(call, valueOf, [value]); var result = !value; } catch (error) { } return (_isNativeReflectConstruct_83471_isNativeReflectConstruct = function() { return !!result; })(); } function _createForOfIteratorHelperLoose_83474(a0, a1) { // fn#83474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:613, offset: 0x01f1c335, 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 _fun83475; } value = undefined; if (a0) { if (typeof a0 === 'string') { value = _arrayLikeToArray_83476(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_83476(a0, value); r6 = value; } else { regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', ''); if (regexp.test(r9)) { value = _arrayLikeToArray_83476(a0, value); r6 = value; } else { r6 = value; } } r5 = r6; } } else { r5 = value; } if (r5) { if (r5) { } return _fun83475; } 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 GUILD_UPDATE_83477() { // fn#83477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:3042, offset: 0x01f1c4a9, size: 392 bytes, params: 1, frame: 22 var r2; var r1; var r0; var shouldShowRaidInAppNotification2; var show; var guildId; var guild; var channel; var value5; var value7; var value8; var object; const value2 = undefined; const notificationTextUtilsModule = require(10911) /* metro dependency 10911: NotificationTextUtils */; if (notificationTextUtilsModule.allowInAppNotifications()) { shouldShowRaidInAppNotification2 = (require(10923) /* metro dependency 10923: GuildAntiRaidHooks */).shouldShowRaidInAppNotification(); show = shouldShowRaidInAppNotification2.show; guildId = shouldShowRaidInAppNotification2.guildId; if (show) { if (guildId == null) { return false; } guild = GuildStore.getGuild(guildId); if (guild == null) { return false; } channel = ChannelStore.getChannel((importDefault(10927) /* metro dependency 10927: getGuildSafetyAlertsChannelId */)(guild)); value5 = channel != null; if (value5) { value7 = SelectedChannelStore.getChannelId() !== channel.id; if (value7) { value8 = env0_25.wasRecentlyDismissed({guild: guild, channel: channel}); if (value8) { r2 = !value8; } else { object = {}; object.type = InAppNotificationTypes.ALERT; object.key = guildId; object.duration = 30 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83478; object.channel = channel; object.guild = guild; object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId(); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); r2 = value2; } r1 = r2; } else { r1 = value7; } r0 = r1; } else { r0 = value5; } return r0; } } return false; } function getCurrentRestrictedSchedule() { // fn#83479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:3648, offset: 0x01f1c67a, size: 66 bytes, params: 1, frame: 12 const currentUser = UserStore.getCurrentUser(); const value2 = null; const restrictedSchedule = value2 == currentUser ? undefined : currentUser.restrictedSchedule; return value2 == restrictedSchedule || restrictedSchedule.rules.length === 0 ? value2 : restrictedSchedule; } function ENQUEUE_IN_APP_NOTIFICATION({notification}) { // fn#83480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:3795, offset: 0x01f1c6bc, size: 223 bytes, params: 2, frame: 22 if (env0_28) { trackDismissed(notification, 'restricted_hours'); return false; } const {guildId, channelId, messageId} = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).extractGuildAndChannelAndMessageIdFromNotification(notification); const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */; const trackWithMetadata = defaultImport.trackWithMetadata; const IN_APP_NOTIFICATION_CREATED = AnalyticEvents.IN_APP_NOTIFICATION_CREATED; Reflect.apply(trackWithMetadata, defaultImport, [IN_APP_NOTIFICATION_CREATED, {type: notification.type, guild_id: guildId, channel_id: channelId, in_app_notification_id: notification.inAppNotificationId, message_id: messageId}]); env0_27.enqueue(notification); (require(10930) /* metro dependency 10930: playInAppMessageSound */).playInAppMessageSound(notification); if (env0_26 == null) { showNextNotification(); } } function trackDismissed(a0, a1) { // fn#83481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:4274, offset: 0x01f1c79b, size: 137 bytes, params: 3, frame: 19 const {guildId, channelId, messageId} = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).extractGuildAndChannelAndMessageIdFromNotification(a0); const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */; const trackWithMetadata = defaultImport.trackWithMetadata; const IN_APP_NOTIFICATION_DISMISSED = AnalyticEvents.IN_APP_NOTIFICATION_DISMISSED; Reflect.apply(trackWithMetadata, defaultImport, [IN_APP_NOTIFICATION_DISMISSED, {type: a0.type, guild_id: guildId, channel_id: channelId, message_id: messageId, dismiss_reason: a1, in_app_notification_id: a0.inAppNotificationId}]); } function showNextNotification() { // fn#83482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:4586, offset: 0x01f1c824, size: 27 bytes, params: 1, frame: 10 env0_26 = env0_27.tryDrain(); } function rejectNotifications(a0) { // fn#83483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:4633, offset: 0x01f1c83f, size: 85 bytes, params: 2, frame: 13 env0_27.removeAll(a0); if (env0_26 == null) { if (env0_26 != null) { return false; } showNextNotification(); } else { if (a0(env0_26)) { env0_26 = null; showNextNotification(); return true; } if (env0_26 != null) { return false; } showNextNotification(); } return true; } function _fun83484() { // fn#83484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:1533, offset: 0x01f1c894, size: 111 bytes, params: 1, frame: 15 return env0_7(AlertDismissalHandler, [{key: 'key', value: function({guild, channel}) { guild = guild.id; return guild + channel.id; }}, {key: 'dismissNotification', value: value_83487}, {key: 'wasRecentlyDismissed', value: value_83488}]); } function _fun83489() { // fn#83489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:2423, offset: 0x01f1cb31, size: 138 bytes, params: 1, frame: 15 return env0_7(NotificationQueue, [{key: 'enqueue', value: value_83491}, {key: 'tryDrain', value: function() { return this.queue.shift(); }}, {key: 'isFull', value: function() { return this.queue.length >= 2; }}, {key: 'removeAll', value: function(a0) { var r2; var value4; var value2 = _createForOfIteratorHelperLoose_83474(importDefault(dependencyMap[22]).remove(this.queue, a0)); var value3 = value2(); if (!value3.done) { for (r2 = value3; true; r2 = value4) { trackDismissed(r2.value, 'rejected_from_queue'); value4 = value2(); if (value4.done) { break; } } } }}]); } function _fun83495(a0) { // fn#83495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:4790, offset: 0x01f1cccc, size: 99 bytes, params: 2, frame: 16 const closure = InAppNotificationStore; env0_5(closure, a0); return env0_7(closure, [{key: 'initialize', value: function() { this.waitFor(ChannelRTCStore, ChannelStore, EmbeddedActivitiesStore, FamilyCenterStore, GuildIncidentsStore, GuildStore, NotificationSettingsStore, ReadStateStore, SelectedChannelStore, UserRequiredActionStore, UserSettingsProtoStore, UserStore); this.syncWith([GuildIncidentsStore], GUILD_UPDATE_83477); }}, {key: 'getCurrentNotification', value: value_83498}]); } function LOGOUT_83500() { // fn#83500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:5511, offset: 0x01f1ce42, size: 73 bytes, params: 1, frame: 12 env0_30 = (require(10908) /* metro dependency 10908: RestrictedScheduleNotificationUtils */).EMPTY_SCHEDULE_SNAPSHOT; env0_27.removeAll(function() { return true; }); } function MESSAGE_CREATE_83502({message, optimistic}) { // fn#83502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:5653, offset: 0x01f1ce8b, size: 643 bytes, params: 2, frame: 20 var moduleValue2; var SELF_MENTIONABLE_SYSTEM; var moduleValue3; var defaultImport; var shouldIncludeSelectedChannel2; var moduleValue5; var channel; var messageRecord; var moduleValue7; var object; var id; var getMentionCount; const channel_id = message.channel_id; const messageUtilsModule = require(10910) /* metro dependency 10910: MessageUtils */; if (messageUtilsModule.canViewPotentiallyNSFWChannel(channel_id)) { moduleValue2 = require(5087) /* metro dependency 5087: SpoilerChannelUtils */; if (moduleValue2.shouldShowSpoilerGateForChannelId(channel_id)) { return false; } if ((importDefault(5216) /* metro dependency 5216: isSystemMessage */)(message)) { SELF_MENTIONABLE_SYSTEM = MessageTypesSets.SELF_MENTIONABLE_SYSTEM; if (SELF_MENTIONABLE_SYSTEM.has(message.type)) { if (optimistic) { return false; } moduleValue3 = require(10911) /* metro dependency 10911: NotificationTextUtils */; if (moduleValue3.allowInAppNotifications()) { defaultImport = importDefault(10684) /* metro dependency 10684: ExternalPipAndroid */; if (defaultImport.isEnabled()) { return false; } if (ChannelRTCStore.getChatOpen(channel_id)) { return false; } shouldIncludeSelectedChannel2 = (require(10911) /* metro dependency 10911: NotificationTextUtils */).shouldIncludeSelectedChannel(); moduleValue5 = require(10911) /* metro dependency 10911: NotificationTextUtils */; if (moduleValue5.shouldNotify(message, channel_id, shouldIncludeSelectedChannel2)) { channel = ChannelStore.getChannel(channel_id); if (channel == null) { return false; } messageRecord = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(message); moduleValue7 = require(10919) /* metro dependency 10919: useFormattedMessagePreview */; if (moduleValue7.isMessageContentPreviewable(messageRecord)) { trackMessageNotificationTimestamps(message, channel.guild_id); object = {}; object.type = InAppNotificationTypes.MESSAGE; object.guild = GuildStore.getGuild(channel.getGuildId()); object.channel = channel; object.message = messageRecord; id = messageRecord.id; object.key = id; object.duration = 5 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83503; object.parentChannel = ChannelStore.getChannel(channel.parent_id); object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId(); getMentionCount = ReadStateStore.getMentionCount; id = channel.id; object.mentionCount = Reflect.apply(getMentionCount, ReadStateStore, [id]); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); return undefined; } return false; } return false; } return false; } return false; } if (optimistic) { return false; } moduleValue3 = require(10911) /* metro dependency 10911: NotificationTextUtils */; if (moduleValue3.allowInAppNotifications()) { defaultImport = importDefault(10684) /* metro dependency 10684: ExternalPipAndroid */; if (defaultImport.isEnabled()) { return false; } if (ChannelRTCStore.getChatOpen(channel_id)) { return false; } shouldIncludeSelectedChannel2 = (require(10911) /* metro dependency 10911: NotificationTextUtils */).shouldIncludeSelectedChannel(); moduleValue5 = require(10911) /* metro dependency 10911: NotificationTextUtils */; if (moduleValue5.shouldNotify(message, channel_id, shouldIncludeSelectedChannel2)) { channel = ChannelStore.getChannel(channel_id); if (channel == null) { return false; } messageRecord = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(message); moduleValue7 = require(10919) /* metro dependency 10919: useFormattedMessagePreview */; if (moduleValue7.isMessageContentPreviewable(messageRecord)) { trackMessageNotificationTimestamps(message, channel.guild_id); object = {}; object.type = InAppNotificationTypes.MESSAGE; object.guild = GuildStore.getGuild(channel.getGuildId()); object.channel = channel; object.message = messageRecord; id = messageRecord.id; object.key = id; object.duration = 5 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83503; object.parentChannel = ChannelStore.getChannel(channel.parent_id); object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId(); getMentionCount = ReadStateStore.getMentionCount; id = channel.id; object.mentionCount = Reflect.apply(getMentionCount, ReadStateStore, [id]); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); return undefined; } return false; } return false; } } return false; } function MESSAGE_ACK_83504({channelId, messageId}) { // fn#83504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:6591, offset: 0x01f1d133, size: 95 bytes, params: 2, frame: 15 const closure = MESSAGE_ACK_83504Predicate; if (env0_26 != null && closure(env0_26)) { trackDismissed(env0_26, 'message_acked'); } return rejectNotifications(closure); } function REACTION_NOTIFICATION_SENT({message, route, emoji, reactorUserId}) { // fn#83506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:6858, offset: 0x01f1d201, size: 942 bytes, params: 2, frame: 26 var r1; var id; var id2; var type; var r7; var channelId; var guildId; var channel; var currentUser; var author; const ReactionNotifications = (require(3829) /* metro dependency 3829: UserSettings */).ReactionNotifications; const ReactionNotificationType = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ReactionNotificationType; var defaultImport; var EnableGdmAllReactionNotifications; var moduleValue3; var isReactionMilestoneNotification; var guild; var user; var shouldIncludeSelectedChannel2; var moduleValue5; var messageRecord; var moduleValue7; var object; if (message != null) { var reactions = message.reactions; if (reactions == null) { return false; } if (emoji == null) { return false; } var value; var value2 = undefined; var moduleValue = require(10911) /* metro dependency 10911: NotificationTextUtils */; if (moduleValue.allowInAppNotifications()) { r1 = (require(4246) /* metro dependency 4246: LinkUtils */).tryParseChannelPath(route) ?? ({'channelId': null, 'guildId': null}); channelId = r1.channelId; guildId = r1.guildId; if (channelId == null) { return false; } if (guildId == null) { return false; } channel = ChannelStore.getChannel(channelId); if (channel == null) { return false; } currentUser = UserStore.getCurrentUser(); author = message.author; id = author == null ? value2 : author.id; id2 = currentUser == null ? value2 : currentUser.id; type = channel.type; if (type !== ChannelTypes.GROUP_DM) { if (ReactionNotifications.getSetting() !== ReactionNotificationType.NOTIFICATIONS_DISABLED) { type = channel == null ? value2 : channel.type; r1 = type != null && channel.type === ChannelTypes.GUILD_ANNOUNCEMENT; moduleValue3 = require(10921) /* metro dependency 10921: InAppNotificationUtils */; isReactionMilestoneNotification = moduleValue3.isReactionMilestoneNotification; reactions = message.reactions; type = channel == null ? value2 : channel.type; r1 = !r1 ? Reflect.apply(isReactionMilestoneNotification, moduleValue3, [reactions, type]) : r1; guild = GuildStore.getGuild(guildId); user = UserStore.getUser(reactorUserId); if (user != null) { shouldIncludeSelectedChannel2 = (require(10911) /* metro dependency 10911: NotificationTextUtils */).shouldIncludeSelectedChannel(); moduleValue5 = require(10911) /* metro dependency 10911: NotificationTextUtils */; if (moduleValue5.shouldNotifyForReaction({message: message, channel: channel, reactor: user, includeSelectedChannel: shouldIncludeSelectedChannel2})) { messageRecord = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(message); moduleValue7 = require(10919) /* metro dependency 10919: useFormattedMessagePreview */; if (moduleValue7.isMessageContentPreviewable(messageRecord)) { r7 = message.reactions.find(_fun83507) ?? value2; if (r7 != null) { object = {}; object.type = InAppNotificationTypes.REACTION; object.key = channelId; object.duration = 5 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83508; object.channel = channel; object.guild = guild; object.user = user; object.message = messageRecord; object.parentChannel = ChannelStore.getChannel(channel.parent_id); object.reaction = r7; object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId(); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); return value2; } if (r1) { object = {}; object.type = InAppNotificationTypes.REACTION; object.key = channelId; object.duration = 5 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83508; object.channel = channel; object.guild = guild; object.user = user; object.message = messageRecord; object.parentChannel = ChannelStore.getChannel(channel.parent_id); object.reaction = r7; object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId(); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); return value2; } return false; } return false; } return false; } if (r1) { shouldIncludeSelectedChannel2 = (require(10911) /* metro dependency 10911: NotificationTextUtils */).shouldIncludeSelectedChannel(); moduleValue5 = require(10911) /* metro dependency 10911: NotificationTextUtils */; if (moduleValue5.shouldNotifyForReaction({message: message, channel: channel, reactor: user, includeSelectedChannel: shouldIncludeSelectedChannel2})) { messageRecord = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(message); moduleValue7 = require(10919) /* metro dependency 10919: useFormattedMessagePreview */; if (moduleValue7.isMessageContentPreviewable(messageRecord)) { r7 = message.reactions.find(_fun83507) ?? value2; if (r7 != null) { object = {}; object.type = InAppNotificationTypes.REACTION; object.key = channelId; object.duration = 5 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83508; object.channel = channel; object.guild = guild; object.user = user; object.message = messageRecord; object.parentChannel = ChannelStore.getChannel(channel.parent_id); object.reaction = r7; object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId(); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); return value2; } if (r1) { object = {}; object.type = InAppNotificationTypes.REACTION; object.key = channelId; object.duration = 5 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83508; object.channel = channel; object.guild = guild; object.user = user; object.message = messageRecord; object.parentChannel = ChannelStore.getChannel(channel.parent_id); object.reaction = r7; object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId(); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); return value2; } return false; } return false; } return false; } return false; } return false; } if (id !== id2) { defaultImport = importDefault(10928) /* metro dependency 10928: GdmAllReactionNotificationsExperiment */; if (defaultImport.getConfig({location: 'handleReactionAdd'}).showSettingsToggle) { EnableGdmAllReactionNotifications = (require(3829) /* metro dependency 3829: UserSettings */).EnableGdmAllReactionNotifications; if (EnableGdmAllReactionNotifications.getSetting()) { type = channel == null ? value2 : channel.type; r1 = type != null && channel.type === ChannelTypes.GUILD_ANNOUNCEMENT; moduleValue3 = require(10921) /* metro dependency 10921: InAppNotificationUtils */; isReactionMilestoneNotification = moduleValue3.isReactionMilestoneNotification; reactions = message.reactions; type = channel == null ? value2 : channel.type; r1 = !r1 ? Reflect.apply(isReactionMilestoneNotification, moduleValue3, [reactions, type]) : r1; guild = GuildStore.getGuild(guildId); user = UserStore.getUser(reactorUserId); if (user != null) { shouldIncludeSelectedChannel2 = (require(10911) /* metro dependency 10911: NotificationTextUtils */).shouldIncludeSelectedChannel(); moduleValue5 = require(10911) /* metro dependency 10911: NotificationTextUtils */; if (moduleValue5.shouldNotifyForReaction({message: message, channel: channel, reactor: user, includeSelectedChannel: shouldIncludeSelectedChannel2})) { messageRecord = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(message); moduleValue7 = require(10919) /* metro dependency 10919: useFormattedMessagePreview */; if (moduleValue7.isMessageContentPreviewable(messageRecord)) { r7 = message.reactions.find(_fun83507) ?? value2; if (r7 != null) { object = {}; object.type = InAppNotificationTypes.REACTION; object.key = channelId; object.duration = 5 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83508; object.channel = channel; object.guild = guild; object.user = user; object.message = messageRecord; object.parentChannel = ChannelStore.getChannel(channel.parent_id); object.reaction = r7; object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId(); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); return value2; } if (r1) { object = {}; object.type = InAppNotificationTypes.REACTION; object.key = channelId; object.duration = 5 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83508; object.channel = channel; object.guild = guild; object.user = user; object.message = messageRecord; object.parentChannel = ChannelStore.getChannel(channel.parent_id); object.reaction = r7; object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId(); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); return value2; } return false; } return false; } return false; } if (r1) { shouldIncludeSelectedChannel2 = (require(10911) /* metro dependency 10911: NotificationTextUtils */).shouldIncludeSelectedChannel(); moduleValue5 = require(10911) /* metro dependency 10911: NotificationTextUtils */; if (moduleValue5.shouldNotifyForReaction({message: message, channel: channel, reactor: user, includeSelectedChannel: shouldIncludeSelectedChannel2})) { messageRecord = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(message); moduleValue7 = require(10919) /* metro dependency 10919: useFormattedMessagePreview */; if (moduleValue7.isMessageContentPreviewable(messageRecord)) { r7 = message.reactions.find(_fun83507) ?? value2; if (r7 != null) { object = {}; object.type = InAppNotificationTypes.REACTION; object.key = channelId; object.duration = 5 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83508; object.channel = channel; object.guild = guild; object.user = user; object.message = messageRecord; object.parentChannel = ChannelStore.getChannel(channel.parent_id); object.reaction = r7; object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId(); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); return value2; } if (r1) { object = {}; object.type = InAppNotificationTypes.REACTION; object.key = channelId; object.duration = 5 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83508; object.channel = channel; object.guild = guild; object.user = user; object.message = messageRecord; object.parentChannel = ChannelStore.getChannel(channel.parent_id); object.reaction = r7; object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId(); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); return value2; } return false; } return false; } return false; } return false; } return false; } return false; } if (ReactionNotifications.getSetting() !== ReactionNotificationType.NOTIFICATIONS_DISABLED) { type = channel == null ? value2 : channel.type; r1 = type != null && channel.type === ChannelTypes.GUILD_ANNOUNCEMENT; moduleValue3 = require(10921) /* metro dependency 10921: InAppNotificationUtils */; isReactionMilestoneNotification = moduleValue3.isReactionMilestoneNotification; reactions = message.reactions; type = channel == null ? value2 : channel.type; r1 = !r1 ? Reflect.apply(isReactionMilestoneNotification, moduleValue3, [reactions, type]) : r1; guild = GuildStore.getGuild(guildId); user = UserStore.getUser(reactorUserId); if (user != null) { shouldIncludeSelectedChannel2 = (require(10911) /* metro dependency 10911: NotificationTextUtils */).shouldIncludeSelectedChannel(); moduleValue5 = require(10911) /* metro dependency 10911: NotificationTextUtils */; if (moduleValue5.shouldNotifyForReaction({message: message, channel: channel, reactor: user, includeSelectedChannel: shouldIncludeSelectedChannel2})) { messageRecord = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(message); moduleValue7 = require(10919) /* metro dependency 10919: useFormattedMessagePreview */; if (moduleValue7.isMessageContentPreviewable(messageRecord)) { r7 = message.reactions.find(_fun83507) ?? value2; if (r7 != null) { object = {}; object.type = InAppNotificationTypes.REACTION; object.key = channelId; object.duration = 5 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83508; object.channel = channel; object.guild = guild; object.user = user; object.message = messageRecord; object.parentChannel = ChannelStore.getChannel(channel.parent_id); object.reaction = r7; object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId(); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); return value2; } if (r1) { object = {}; object.type = InAppNotificationTypes.REACTION; object.key = channelId; object.duration = 5 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83508; object.channel = channel; object.guild = guild; object.user = user; object.message = messageRecord; object.parentChannel = ChannelStore.getChannel(channel.parent_id); object.reaction = r7; object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId(); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); return value2; } return false; } return false; } return false; } if (r1) { shouldIncludeSelectedChannel2 = (require(10911) /* metro dependency 10911: NotificationTextUtils */).shouldIncludeSelectedChannel(); moduleValue5 = require(10911) /* metro dependency 10911: NotificationTextUtils */; if (moduleValue5.shouldNotifyForReaction({message: message, channel: channel, reactor: user, includeSelectedChannel: shouldIncludeSelectedChannel2})) { messageRecord = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(message); moduleValue7 = require(10919) /* metro dependency 10919: useFormattedMessagePreview */; if (moduleValue7.isMessageContentPreviewable(messageRecord)) { r7 = message.reactions.find(_fun83507) ?? value2; if (r7 != null) { object = {}; object.type = InAppNotificationTypes.REACTION; object.key = channelId; object.duration = 5 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83508; object.channel = channel; object.guild = guild; object.user = user; object.message = messageRecord; object.parentChannel = ChannelStore.getChannel(channel.parent_id); object.reaction = r7; object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId(); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); return value2; } if (r1) { object = {}; object.type = InAppNotificationTypes.REACTION; object.key = channelId; object.duration = 5 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83508; object.channel = channel; object.guild = guild; object.user = user; object.message = messageRecord; object.parentChannel = ChannelStore.getChannel(channel.parent_id); object.reaction = r7; object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId(); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); return value2; } return false; } return false; } return false; } return false; } return false; } } return false; } function MESSAGE_REMINDER_DUE({savedMessage}) { // fn#83509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:8491, offset: 0x01f1d5fc, size: 315 bytes, params: 2, frame: 20 var getChannel; var saveData; var channelId; var value2; var value3; var object; const defaultImport = importDefault(10929) /* metro dependency 10929: ForLaterExperiment */; const getConfig = defaultImport.getConfig; if (Reflect.apply(getConfig, defaultImport, [{location: 'inAppNotificationStore'}]).enabled) { if (savedMessage.message != null) { getChannel = ChannelStore.getChannel; saveData = savedMessage.saveData; channelId = saveData.channelId; value2 = Reflect.apply(getChannel, ChannelStore, [channelId]); if (value2 != null) { saveData = savedMessage.saveData; channelId = saveData.channelId; saveData = savedMessage.saveData; value3 = '' + channelId + '-' + saveData.messageId; object = {}; object.type = InAppNotificationTypes.MESSAGE_REMINDER; object.key = value3; object.duration = 10 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83510; object.channel = value2; object.author = savedMessage.message.author; object.savedMessage = savedMessage; object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId(); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); } } } } function RESTRICTED_HOURS_WARNING({title, subtitle}) { // fn#83511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:9028, offset: 0x01f1d737, size: 242 bytes, params: 2, frame: 20 var r1; var r0; var screenDowntimeReminder; var object; const isFamilyCenterV3Enabled = (require(5188) /* metro dependency 5188: FamilyCenterV3Experiment */).getIsFamilyCenterV3Enabled({location: 'InAppNotificationStore'}); if (isFamilyCenterV3Enabled) { screenDowntimeReminder = NotificationSettingsStore.screenDowntimeReminder; if (screenDowntimeReminder) { object = {}; object.type = InAppNotificationTypes.RESTRICTED_HOURS_WARNING; object.key = 'restricted-hours-warning'; object.duration = 10 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83512; object.title = title; object.subtitle = subtitle; object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId(); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); r1 = undefined; } else { r1 = !!screenDowntimeReminder; } r0 = r1; } else { r0 = !!isFamilyCenterV3Enabled; } return r0; } function RESTRICTED_HOURS_STATE_CHANGE({isInRestrictedHours}) { // fn#83513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:9503, offset: 0x01f1d829, size: 77 bytes, params: 2, frame: 14 if (isInRestrictedHours) { if (env0_26 != null) { trackDismissed(env0_26, 'restricted_hours'); } rejectNotifications(function() { return true; }); return undefined; } return false; } function THREAD_CREATE_83515({channel, isNewlyCreated}) { // fn#83515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:9680, offset: 0x01f1d876, size: 383 bytes, params: 2, frame: 20 var moduleValue; var moduleValue2; var shouldNotifyForForumThreadCreation; var moduleValue3; var value3; var value4; var object; const channel2 = ChannelStore.getChannel(channel.parent_id); if (channel2 != null) { if (channel2.isForumLikeChannel()) { if (isNewlyCreated) { moduleValue = require(10911) /* metro dependency 10911: NotificationTextUtils */; if (moduleValue.allowInAppNotifications()) { moduleValue2 = require(10911) /* metro dependency 10911: NotificationTextUtils */; shouldNotifyForForumThreadCreation = moduleValue2.shouldNotifyForForumThreadCreation; moduleValue3 = require(10915) /* metro dependency 10915: isChannelFocusedNative */; if (Reflect.apply(shouldNotifyForForumThreadCreation, moduleValue2, [channel, channel2, !moduleValue3.isChannelFocused()])) { value3 = UserStore.getUser(channel.ownerId); if (value3 == null) { return false; } value4 = GuildStore.getGuild(channel2.guild_id); if (value4 == null) { return false; } object = {}; object.type = InAppNotificationTypes.FORUM_THREAD_CREATED; object.thread = channel; object.threadCreator = value3; object.parentChannel = channel2; object.guild = value4; object.key = channel.id; object.duration = 5 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83516; object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId(); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); return undefined; } return false; } return false; } return false; } } return false; } function CHANNEL_SELECT_83518({channelId}) { // fn#83518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:10493, offset: 0x01f1da0a, size: 86 bytes, params: 2, frame: 15 const closure = CHANNEL_SELECT_83518Predicate; if (env0_26 != null && closure(env0_26)) { trackDismissed(env0_26, 'notification_clicked'); } return rejectNotifications(closure); } function CHANNEL_RTC_UPDATE_CHAT_OPEN_83520({channelId, chatOpen}) { // fn#83520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:10811, offset: 0x01f1daf0, size: 96 bytes, params: 2, frame: 15 const closure = CHANNEL_RTC_UPDATE_CHAT_OPEN_83520Predicate; if (env0_26 != null && closure(env0_26)) { trackDismissed(env0_26, 'notification_clicked'); } return rejectNotifications(closure); } function USER_SETTINGS_PROTO_UPDATE_83522() { // fn#83522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:11053, offset: 0x01f1db8d, size: 103 bytes, params: 1, frame: 16 var r0; const value2 = (require(10911) /* metro dependency 10911: NotificationTextUtils */).allowInAppNotifications(); if (value2) { r0 = !value2; } else { if (env0_26 != null) { trackDismissed(env0_26, 'settings_updated'); } env0_27.removeAll(function() { return true; }); r0 = true; } return r0; } function CURRENT_USER_UPDATE_83524() { // fn#83524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:11236, offset: 0x01f1dbf4, size: 429 bytes, params: 1, frame: 21 var r1; var moduleValue; var moduleValue2; var value3; var object; var moduleValue5; var restrictedScheduleNotificationKey; var kind; var getRestrictedScheduleNotificationTitle; var value; if (env0_29) { moduleValue = require(5188) /* metro dependency 5188: FamilyCenterV3Experiment */; if (moduleValue.getIsFamilyCenterV3Enabled({location: 'InAppNotificationStore'})) { moduleValue2 = require(10908) /* metro dependency 10908: RestrictedScheduleNotificationUtils */; value3 = (require(10908) /* metro dependency 10908: RestrictedScheduleNotificationUtils */).diffSchedules(EMPTY_SCHEDULE_SNAPSHOT, moduleValue2.toScheduleSnapshot(getCurrentRestrictedSchedule())); r1 = value3 != null && (require(3829) /* metro dependency 3829: UserSettings */).EnableScreenDowntimeScheduleNotifications.getSetting(); r1 = r1 && (require(10911) /* metro dependency 10911: NotificationTextUtils */).allowInAppNotifications(); if (r1) { object = {}; object.type = InAppNotificationTypes.RESTRICTED_SCHEDULE_UPDATED; moduleValue5 = require(10908) /* metro dependency 10908: RestrictedScheduleNotificationUtils */; restrictedScheduleNotificationKey = moduleValue5.restrictedScheduleNotificationKey; kind = value3.kind; object.key = Reflect.apply(restrictedScheduleNotificationKey, moduleValue5, [kind]); object.duration = 7 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND; object.onDismiss = onDismiss_83525; value = require(10908) /* metro dependency 10908: RestrictedScheduleNotificationUtils */; getRestrictedScheduleNotificationTitle = value.getRestrictedScheduleNotificationTitle; kind = value3.kind; object.title = Reflect.apply(getRestrictedScheduleNotificationTitle, value, [kind]); value = require(10908) /* metro dependency 10908: RestrictedScheduleNotificationUtils */; object.subtitle = value.getRestrictedScheduleNotificationSubtitle(value3.rule); value = require(10921) /* metro dependency 10921: InAppNotificationUtils */; object.inAppNotificationId = value.generateInAppNotificationId(); ENQUEUE_IN_APP_NOTIFICATION({notification: object}); } return undefined; } } return false; } function GUILD_UPDATE_83477OnDismiss() { // fn#83478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:3487, owner: GUILD_UPDATE_83477.onDismiss, offset: 0x01f1c631, size: 73 bytes, params: 1, frame: 14 (importDefault(10920) /* metro dependency 10920: InAppNotificationActionCreators */).clearNotification(); env1_25.dismissNotification({guild: env0_0, channel: env0_1}); } function AlertDismissalHandler() { // fn#83485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:1554, offset: 0x01f1c903, size: 172 bytes, params: 1, frame: 19 const value = environment.__proto__; env1_6(this, AlertDismissalHandler); const object2 = {}; const GuildIncidentAlertTypes = (require(8277) /* metro dependency 8277: GuildAntiRaidTypes */).GuildIncidentAlertTypes; const JOIN_RAID = GuildIncidentAlertTypes.JOIN_RAID; let Map = global.Map; object2[JOIN_RAID] = new Map(); const DM_RAID = GuildIncidentAlertTypes.DM_RAID; Map = global.Map; object2[DM_RAID] = new Map(); this.dissmissedAlertsMap = object2; this.threshold = {'amount': 1, 'unitOfTime': 'hour'}; } function value_83487({guild, channel}) { // fn#83487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:1896, offset: 0x01f1c9cc, size: 145 bytes, params: 2, frame: 19 const guildAntiRaidUtilsModule = require(8275) /* metro dependency 8275: GuildAntiRaidUtils */; const getIncidentAlertType = guildAntiRaidUtilsModule.getIncidentAlertType; const getGuildIncident = GuildIncidentsStore.getGuildIncident; const value2 = Reflect.apply(getIncidentAlertType, guildAntiRaidUtilsModule, [Reflect.apply(getGuildIncident, GuildIncidentsStore, [guild.id])]); if (value2 != null) { this.dissmissedAlertsMap[value2].set(this.key({guild: guild, channel: channel}), (importDefault(3738) /* metro dependency 3738 */)()); } } function value_83488({guild, channel}) { // fn#83488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:2120, offset: 0x01f1ca5d, size: 212 bytes, params: 2, frame: 19 var r0; var diff; var value6; var threshold; let value = environment.__proto__; const guildAntiRaidUtilsModule = require(8275) /* metro dependency 8275: GuildAntiRaidUtils */; const getIncidentAlertType = guildAntiRaidUtilsModule.getIncidentAlertType; const getGuildIncident = GuildIncidentsStore.getGuildIncident; const value2 = Reflect.apply(getIncidentAlertType, guildAntiRaidUtilsModule, [Reflect.apply(getGuildIncident, GuildIncidentsStore, [guild.id])]); if (value2 == null) { return false; } const value4 = this.dissmissedAlertsMap[value2].get(this.key({guild: guild, channel: channel})); const value5 = value4 !== undefined; if (value5) { value = (importDefault(3738) /* metro dependency 3738 */)(); diff = value.diff; value6 = (importDefault(3738) /* metro dependency 3738 */)(value4); threshold = this.threshold; value = Reflect.apply(diff, value, [value6, threshold.unitOfTime]); threshold = this.threshold; value = value < threshold.amount; r0 = value; } else { r0 = value5; } return r0; } function NotificationQueue() { // fn#83490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:2444, offset: 0x01f1cbbb, size: 37 bytes, params: 1, frame: 13 env1_6(this, NotificationQueue); this.queue = []; } function value_83491(a0) { // fn#83491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:2537, offset: 0x01f1cbe0, size: 84 bytes, params: 2, frame: 14 var value; var value2; if (this.isFull()) { value = this.queue.shift(); if (value != null) { value2 = environment.__proto__; trackDismissed(value, 'evicted_from_queue'); } } this.queue.push(a0); } function InAppNotificationStore() { // fn#83496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:4802, offset: 0x01f1cd2f, size: 113 bytes, params: 1, frame: 20 const value = environment.__proto__; env1_6(this, InAppNotificationStore); const value3 = env1_4(InAppNotificationStore); return env1_3(this, _isNativeReflectConstruct_83471() ? global.Reflect.construct(value3, arguments, env1_4(this).constructor) : value3.apply(this, arguments)); } function MESSAGE_CREATE_83502OnDismiss() { // fn#83503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:6403, owner: MESSAGE_CREATE_83502.onDismiss, offset: 0x01f1d10e, size: 37 bytes, params: 1, frame: 11 const value = environment.__proto__; (importDefault(10920) /* metro dependency 10920: InAppNotificationActionCreators */).clearNotification(); } function MESSAGE_ACK_83504Predicate(a0) { // fn#83505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:6658, owner: MESSAGE_ACK_83504.predicate, offset: 0x01f1d192, size: 111 bytes, params: 2, frame: 14 const type = a0.type; let value = environment.__proto__; const MESSAGE = InAppNotificationTypes.MESSAGE; let r0 = type === MESSAGE && a0.channel.id === channelId; if (r0) { value = importDefault(21) /* metro dependency 21: SnowflakeUtils */; value = value.compare(a0.message.id, messageId); value = value <= 0; r0 = value; } return r0; } function _fun83507(a0) { // fn#83507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:8087, offset: 0x01f1d5af, size: 77 bytes, params: 2, frame: 5 let r0 = a0.emoji.id === emoji.id && emoji.id != null; r0 = !r0 ? a0.emoji.name === emoji.name : r0; return r0; } function CHANNEL_SELECT_83518Predicate(a0) { // fn#83519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:10551, owner: CHANNEL_SELECT_83518.predicate, offset: 0x01f1da60, size: 144 bytes, params: 2, frame: 6 const type = a0.type; const value = environment.__proto__; const MESSAGE = InAppNotificationTypes.MESSAGE; let r0 = type === MESSAGE && a0.channel.id === channelId; r0 = !r0 ? a0.type === InAppNotificationTypes.MESSAGE_FAILED_TO_SEND && a0.channelId === channelId : r0; r0 = !r0 ? a0.type === InAppNotificationTypes.ALERT && a0.channel.id === channelId : r0; return r0; } function CHANNEL_RTC_UPDATE_CHAT_OPEN_83520Predicate(a0) { // fn#83521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11091:10880, owner: CHANNEL_RTC_UPDATE_CHAT_OPEN_83520.predicate, offset: 0x01f1db50, size: 61 bytes, params: 2, frame: 3 const type = a0.type; const value = environment.__proto__; const MESSAGE = InAppNotificationTypes.MESSAGE; return type === MESSAGE && a0.channel.id === channelId && chatOpen; }