Files
discord-decomp/sources/modules/notifications/NotificationTextUtils.tsx
T
2026-07-27 16:20:00 +03:00

1491 lines
64 KiB
TypeScript

/* Metro module 10911; source: modules/notifications/NotificationTextUtils.tsx; dependencies: [1378, 3785, 4621, 3786, 7710, 1383, 1379, 1867, 4294, 3793, 1934, 3969, 6876, 4864, 1373, 1878, 10912, 661, 8044, 1243, 3829, 1391, 10913, 10914, 4639, 4008, 10915, 7078, 4805, 1244, 8430, 4617, 5216, 8233, 3, 4845, 3995, 1909, 7076, 10916, 566, 2] */
function _fun83611(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11097:6, offset: 0x01f201c2, size: 682 bytes, params: 8, frame: 20
const env0_0 = require;
const _arrayLikeToArray_83614 = 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 = shouldNotifyBase;
const getInviteEmbedFormatString = function({type}, a1, a2, a3) {
if (ChannelTypes.GUILD_ANNOUNCEMENT === type) {
return a1;
}
if (ChannelTypes.GUILD_TEXT === type) {
return a1;
}
if (ChannelTypes.GROUP_DM === type) {
return a2;
}
ChannelTypes.DM;
return a3;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
const messageRequestStore = importDefault(4621) /* metro dependency 4621: MessageRequestStore */;
const joinedThreadsStore = importDefault(3786) /* metro dependency 3786: JoinedThreadsStore */;
const voicePanelStore = importDefault(7710) /* metro dependency 7710: VoicePanelStore */;
let value = require(1383) /* metro dependency 1383: ChannelRecord */;
const env0_8 = value.GUILD_VOCAL_CHANNEL_TYPES;
const env0_9 = value.THREAD_CHANNEL_TYPES;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const selfPresenceStore = importDefault(6876) /* metro dependency 6876: SelfPresenceStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const userRequiredActionStore = importDefault(1373) /* metro dependency 1373: UserRequiredActionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const rpcNotificationSettingsStore = importDefault(10912) /* metro dependency 10912: RpcNotificationSettingsStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_21 = value.ActivityActionTypes;
const env0_22 = value.ChannelTypes;
const env0_23 = value.MessageFlags;
const env0_24 = value.MessageTypes;
const env0_25 = value.MessageTypesSets;
const env0_26 = value.StatusTypes;
const env0_27 = value.UserFlags;
const env0_28 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
const env0_29 = (require(1243) /* metro dependency 1243: ThreadConstants */).ThreadMemberFlags;
const closure2 = renderTitle;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/NotificationTextUtils.tsx');
exports.shouldNotifyBase = closure;
exports.shouldNotify = shouldNotify;
exports.shouldNotifyForSelectedChannel = shouldNotifyForSelectedChannel;
exports.shouldNotifyForForumThreadCreation = shouldNotifyForForumThreadCreation;
exports.shouldNotifyForReaction = shouldNotifyForReaction;
exports.shouldIncludeSelectedChannel = shouldIncludeSelectedChannel;
exports.renderTitle = closure2;
exports.makeTextChatNotification = makeTextChatNotification;
exports.allowInAppNotifications = allowInAppNotifications;
exports.useAllowInAppNotifications = useAllowInAppNotifications;
}
function _createForOfIteratorHelperLoose_83612(a0, a1) { // fn#83612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11097:532, offset: 0x01f2046c, 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 _fun83613;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_83614(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_83614(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_83614(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun83613;
}
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 shouldNotifyBase(a0, a1, a2) { // fn#83615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11097:1442, offset: 0x01f205e0, size: 313 bytes, params: 4, frame: 19
var r3;
var r4;
var r2;
var r1;
var isBlockedOrIgnored2;
var setting;
const value = a3;
let r5 = value !== undefined ? value : {};
const hasFlag = a1.hasFlag;
const SPAMMER = UserFlags.SPAMMER;
if (Reflect.apply(hasFlag, a1, [SPAMMER])) {
return false;
}
if (a2.isManaged()) {
return false;
}
const guildId = a2.getGuildId();
let r0 = guildId == null || !LurkingStore.isLurking(guildId);
if (r0) {
r3 = !r5.ignoreSameUser && a1.id === a0.id;
if (r3) {
r1 = !r3;
} else {
isBlockedOrIgnored2 = RelationshipStore.isBlockedOrIgnored(a1.id);
if (isBlockedOrIgnored2) {
r2 = !isBlockedOrIgnored2;
} else {
r4 = !r5.ignoreStatus && SelfPresenceStore.getStatus() === StatusTypes.DND;
if (r4) {
r3 = !r4;
} else {
setting = (require(3829) /* metro dependency 3829: UserSettings */).FocusMode.getSetting();
if (setting) {
r4 = !setting;
} else {
r5 = !r5.ignoreNoMessagesSetting && UserGuildSettingsStore.allowNoMessages(a2);
r4 = !r5;
}
r3 = r4;
}
r2 = r3;
}
r1 = r2;
}
r0 = r1;
}
return r0;
}
function renderTitle(a0, a1, a2) { // fn#83617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11097:1812, offset: 0x01f20767, size: 241 bytes, params: 4, frame: 26
var r3;
var moduleValue4;
var moduleValue5;
var value;
const isolateStringModule = require(7078) /* metro dependency 7078: IsolateString */;
let isolate = isolateStringModule.isolate;
const value2 = Reflect.apply(isolate, isolateStringModule, [a0]);
const moduleValue2 = isolateStringModule;
isolate = moduleValue2.isolate;
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
const value3 = Reflect.apply(isolate, moduleValue2, [useChannelNameModule.computeChannelName(a1, UserStore,
RelationshipStore, true)]);
const value4 = '';
if (a2 != null) {
moduleValue4 = isolateStringModule;
isolate = moduleValue4.isolate;
moduleValue5 = require(4805) /* metro dependency 4805: useChannelName */;
value = Reflect.apply(isolate, moduleValue4, [moduleValue5.computeChannelName(a2, UserStore,
RelationshipStore)]);
value = ', ' + value;
r3 = value;
} else {
r3 = value4;
}
return value4 + value2 + ' (' + value3 + r3 + ')';
}
function shouldNotify(a0, a1) { // fn#83618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11097:2287, offset: 0x01f20858, size: 991 bytes, params: 3, frame: 25
var r0;
var r11;
var parent_id;
var r3;
var id;
var r8;
var applicationId;
var r1;
var moduleValue;
var value5;
var GROUP_DM;
var RECIPIENT_REMOVE;
var areSlayerNotificationsSuppressed;
var DM;
var value8;
var linkedLobby;
var value9;
var shouldNotifyBaseBinding;
var object2;
var SELF_MENTIONABLE_SYSTEM;
var has;
var isMessageRequest;
var moduleValue2;
var isChannelCurrentlyVisible;
var isBlockedOrIgnoredForMessage;
var activity_instance;
var interaction;
var user;
var id2;
var application_id;
var getCurrentEmbeddedActivity;
var value10;
var location;
var channel_id;
var value11;
var value12;
var getChannelId;
var value13;
var value14;
var allowAllMessages;
var isSuppressEveryoneEnabled;
var getGuildId;
var isSuppressEveryoneEnabled2;
var isSuppressRolesEnabled;
var isSuppressRolesEnabled2;
var isRawMessageMentioned;
var isMuted;
var moduleValue3;
var computeThreadNotificationSetting;
var threadNotificationSetting;
var NO_MESSAGES;
var value15;
var ALL_MESSAGES;
var value16;
let value = a2;
const value2 = a3;
const value3 = undefined;
reducibleJoin2: while (true) {
if (value !== value3) {
r0 = value;
break reducibleJoin2;
}
value = true;
r0 = value;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (value2 !== value3) {
r11 = value2;
break reducibleJoin4;
}
value = false;
r11 = value;
break reducibleJoin4;
}
if (a0.flags != null) {
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
reducibleJoin6: while (true) {
if (moduleValue.hasFlag(a0.flags, MessageFlags.SUPPRESS_NOTIFICATIONS)) {
return false;
}
break reducibleJoin6;
}
}
value = environment;
let getChannel = ChannelStore.getChannel;
const value4 = Reflect.apply(getChannel, ChannelStore, [a1]);
let type = a0.type;
const THREAD_STARTER_MESSAGE = MessageTypes.THREAD_STARTER_MESSAGE;
reducibleJoin10: while (true) {
if (type !== THREAD_STARTER_MESSAGE) {
r3 = value4;
break reducibleJoin10;
}
getChannel = ChannelStore.getChannel;
reducibleJoin9: while (true) {
if (value4 == null) {
parent_id = value3;
break reducibleJoin9;
}
parent_id = value4.parent_id;
break reducibleJoin9;
}
value5 = Reflect.apply(getChannel, ChannelStore, [parent_id]);
r3 = value5;
break reducibleJoin10;
}
const currentUser = UserStore.getCurrentUser();
const getUser = UserStore.getUser;
const author = a0.author;
reducibleJoin12: while (true) {
if (author == null) {
id = value3;
break reducibleJoin12;
}
id = author.id;
break reducibleJoin12;
}
const value7 = Reflect.apply(getUser, UserStore, [id]);
if (r3 != null) {
reducibleJoin56: while (true) {
if (currentUser == null) {
break reducibleJoin56;
}
if (value7 != null) {
type = r3.type;
GROUP_DM = ChannelTypes.GROUP_DM;
if (type === GROUP_DM) {
type = a0.type;
RECIPIENT_REMOVE = MessageTypes.RECIPIENT_REMOVE;
reducibleJoin17: while (true) {
if (type === RECIPIENT_REMOVE) {
return false;
}
break reducibleJoin17;
}
}
areSlayerNotificationsSuppressed = RpcNotificationSettingsStore.areSlayerNotificationsSuppressed;
if (Reflect.apply(areSlayerNotificationsSuppressed, RpcNotificationSettingsStore, [])) {
type = r3.type;
DM = ChannelTypes.DM;
value8 = type === DM;
reducibleJoin20: while (true) {
if (value8) {
r8 = value8;
break reducibleJoin20;
}
linkedLobby = r3.linkedLobby;
value9 = linkedLobby != null;
r8 = value9;
break reducibleJoin20;
}
reducibleJoin21: while (true) {
if (r8) {
return false;
}
break reducibleJoin21;
}
}
shouldNotifyBaseBinding = shouldNotifyBase;
object2 = {ignoreStatus: r11};
SELF_MENTIONABLE_SYSTEM = MessageTypesSets.SELF_MENTIONABLE_SYSTEM;
has = SELF_MENTIONABLE_SYSTEM.has;
type = a0.type;
object2.ignoreSameUser = Reflect.apply(has, SELF_MENTIONABLE_SYSTEM, [type]);
if (shouldNotifyBaseBinding(currentUser, value7, r3, object2)) {
isMessageRequest = MessageRequestStore.isMessageRequest;
if (Reflect.apply(isMessageRequest, MessageRequestStore, [a1])) {
return false;
}
if (!r0) {
moduleValue2 = require(10913) /* metro dependency 10913: ChannelVisibilityUtils */;
isChannelCurrentlyVisible = moduleValue2.isChannelCurrentlyVisible;
id = r3.id;
reducibleJoin27: while (true) {
if (Reflect.apply(isChannelCurrentlyVisible, moduleValue2, [id])) {
return false;
}
break reducibleJoin27;
}
}
isBlockedOrIgnoredForMessage = RelationshipStore.isBlockedOrIgnoredForMessage;
if (Reflect.apply(isBlockedOrIgnoredForMessage, RelationshipStore, [a0])) {
return false;
}
activity_instance = a0.activity_instance;
if (value3 !== activity_instance) {
interaction = a0.interaction;
reducibleJoin31: while (true) {
if (interaction == null) {
break reducibleJoin31;
}
interaction = a0.interaction;
user = interaction.user;
id = user.id;
id2 = currentUser.id;
if (id === id2) {
return false;
}
break reducibleJoin31;
}
}
application_id = a0.application_id;
if (application_id != null) {
getCurrentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity;
value10 = Reflect.apply(getCurrentEmbeddedActivity, EmbeddedActivitiesStore, []);
reducibleJoin34: while (true) {
if (value10 == null) {
applicationId = value3;
break reducibleJoin34;
}
applicationId = value10.applicationId;
break reducibleJoin34;
}
application_id = a0.application_id;
reducibleJoin36: while (true) {
if (applicationId !== application_id) {
break reducibleJoin36;
}
location = value10.location;
channel_id = location.channel_id;
if (channel_id === a1) {
return false;
}
break reducibleJoin36;
}
}
has = THREAD_CHANNEL_TYPES.has;
type = r3.type;
if (Reflect.apply(has, THREAD_CHANNEL_TYPES, [type])) {
isMuted = JoinedThreadsStore.isMuted;
id = r3.id;
if (Reflect.apply(isMuted, JoinedThreadsStore, [id])) {
return false;
}
moduleValue3 = require(10914) /* metro dependency 10914: ThreadNotificationSettings */;
computeThreadNotificationSetting = moduleValue3.computeThreadNotificationSetting;
threadNotificationSetting = Reflect.apply(computeThreadNotificationSetting, moduleValue3, [r3]);
NO_MESSAGES = ThreadMemberFlags.NO_MESSAGES;
value15 = threadNotificationSetting !== NO_MESSAGES;
reducibleJoin48: while (true) {
if (value15) {
ALL_MESSAGES = ThreadMemberFlags.ALL_MESSAGES;
value16 = threadNotificationSetting === ALL_MESSAGES;
reducibleJoin47: while (true) {
if (value16) {
r1 = value16;
break reducibleJoin47;
}
value = require(4639) /* metro dependency 4639: isMessageMentioned */;
isRawMessageMentioned = value.isRawMessageMentioned;
id = currentUser.id;
value = Reflect.apply(isRawMessageMentioned, value, [{rawMessage: a0, userId: id,
suppressEveryone: false,
suppressRoles: false}]);
r1 = value;
break reducibleJoin47;
}
r0 = r1;
break reducibleJoin48;
}
r0 = value15;
break reducibleJoin48;
}
return r0;
}
has = GUILD_VOCAL_CHANNEL_TYPES.has;
type = r3.type;
value11 = Reflect.apply(has, GUILD_VOCAL_CHANNEL_TYPES, [type]);
value12 = !value11;
reducibleJoin39: while (true) {
if (value11) {
getChannelId = RTCConnectionStore.getChannelId;
value13 = Reflect.apply(getChannelId, RTCConnectionStore, []);
id = r3.id;
value14 = value13 === id;
r0 = value14;
break reducibleJoin39;
}
r0 = value12;
break reducibleJoin39;
}
allowAllMessages = UserGuildSettingsStore.allowAllMessages;
if (Reflect.apply(allowAllMessages, UserGuildSettingsStore, [r3])) {
reducibleJoin41: while (true) {
if (r0) {
return true;
}
break reducibleJoin41;
}
}
isSuppressEveryoneEnabled = UserGuildSettingsStore.isSuppressEveryoneEnabled;
getGuildId = r3.getGuildId;
isSuppressEveryoneEnabled2 = Reflect.apply(isSuppressEveryoneEnabled, UserGuildSettingsStore,
[Reflect.apply(getGuildId, r3, [])]);
isSuppressRolesEnabled = UserGuildSettingsStore.isSuppressRolesEnabled;
getGuildId = r3.getGuildId;
isSuppressRolesEnabled2 = Reflect.apply(isSuppressRolesEnabled, UserGuildSettingsStore,
[Reflect.apply(getGuildId,
r3, [])]);
value = require(4639) /* metro dependency 4639: isMessageMentioned */;
isRawMessageMentioned = value.isRawMessageMentioned;
id = currentUser.id;
return Reflect.apply(isRawMessageMentioned, value, [{rawMessage: a0, userId: id,
suppressEveryone: isSuppressEveryoneEnabled2, suppressRoles: isSuppressRolesEnabled2}]);
}
return false;
}
break reducibleJoin56;
}
}
return false;
}
function shouldNotifyForSelectedChannel(a0, a1) { // fn#83619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11097:3862, offset: 0x01f20c37, size: 386 bytes, params: 3, frame: 20
const getChannelId = SelectedChannelStore.getChannelId;
const getGuildId = SelectedGuildStore.getGuildId;
if (Reflect.apply(getChannelId, SelectedChannelStore, [Reflect.apply(getGuildId, SelectedGuildStore, [])]) !== a1) {
return false;
}
const channel = ChannelStore.getChannel(a1);
const type = a0.type;
const THREAD_STARTER_MESSAGE = MessageTypes.THREAD_STARTER_MESSAGE;
const r9 = type !== THREAD_STARTER_MESSAGE ? channel : ChannelStore.getChannel(channel?.parent_id);
const currentUser = UserStore.getCurrentUser();
const user = UserStore.getUser(a0.author?.id);
return r9 != null && currentUser != null && user != null && (!r9.isManaged() && (!user.hasFlag(UserFlags.SPAMMER) && (!RelationshipStore.isBlockedOrIgnoredForMessage(a0) && (user.id !== currentUser.id && (SelfPresenceStore.getStatus() !== StatusTypes.DND && (!(require(3829) /* metro dependency 3829: UserSettings */).FocusMode.getSetting() && !UserGuildSettingsStore.allowNoMessages(r9)))))));
}
function shouldNotifyForForumThreadCreation({ownerId}, a1) { // fn#83620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11097:4390, offset: 0x01f20db9, size: 236 bytes, params: 3, frame: 21
var r2;
var r1;
var shouldNotifyBase2;
var isGuildOrCategoryOrChannelMuted2;
var moduleValue;
const value = a2;
const value2 = a3;
let r3 = !(value !== undefined) || value;
const r9 = value2 !== undefined ? value2 : false;
const currentUser = UserStore.getCurrentUser();
const user = UserStore.getUser(ownerId);
let r0 = a1 != null && currentUser != null && user != null;
if (r0) {
shouldNotifyBase2 = shouldNotifyBase(currentUser, user, a1, {ignoreStatus: r9, ignoreNoMessagesSetting: true});
if (shouldNotifyBase2) {
isGuildOrCategoryOrChannelMuted2 = UserGuildSettingsStore.isGuildOrCategoryOrChannelMuted(a1.guild_id,
a1.id);
if (isGuildOrCategoryOrChannelMuted2) {
r2 = !isGuildOrCategoryOrChannelMuted2;
} else {
if (r3) {
r3 = !r3;
} else {
moduleValue = require(10913) /* metro dependency 10913: ChannelVisibilityUtils */;
r3 = moduleValue.isChannelCurrentlyVisible(a1.id);
}
r3 = !r3 && UserGuildSettingsStore.getNewForumThreadsCreated(a1);
r2 = r3;
}
r1 = r2;
} else {
r1 = !!shouldNotifyBase2;
}
r0 = r1;
}
return r0;
}
function shouldNotifyForReaction({message, channel, reactor, includeSelectedChannel}) { // fn#83621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11097:4770, offset: 0x01f20ea5, size: 219 bytes, params: 2, frame: 23
var r2;
var r3;
var r1;
var shouldNotifyBase2;
var value;
const currentUser = UserStore.getCurrentUser();
const user = UserStore.getUser(message.author?.id);
let r0 = currentUser != null && user != null;
if (r0) {
shouldNotifyBase2 = shouldNotifyBase(currentUser, user, channel, {ignoreSameUser: true});
if (shouldNotifyBase2) {
r2 = reactor == null || !RelationshipStore.isBlockedOrIgnored(reactor.id);
if (r2) {
if (includeSelectedChannel) {
r3 = !includeSelectedChannel;
} else {
value = require(10913) /* metro dependency 10913: ChannelVisibilityUtils */;
value = value.isChannelCurrentlyVisible(channel.id);
r3 = value;
}
value = !r3;
r2 = value;
}
r1 = r2;
} else {
r1 = !!shouldNotifyBase2;
}
r0 = r1;
}
return r0;
}
function shouldIncludeSelectedChannel() { // fn#83622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11097:5130, offset: 0x01f20f80, size: 178 bytes, params: 1, frame: 14
var r1;
var r0;
var rootNavigationRef;
var value;
const isVoicePanelFullscreen2 = VoicePanelStore.getState().isVoicePanelFullscreen();
const value3 = true;
if (isVoicePanelFullscreen2) {
r0 = value3;
} else if (EmbeddedActivitiesStore.getConnectedActivityLocation() == null) {
rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
r1 = rootNavigationRef == null || !rootNavigationRef.isReady();
if (!r1) {
value = require(10915) /* metro dependency 10915: isChannelFocusedNative */;
value = !value.isChannelFocused();
r1 = value;
}
r0 = r1;
} else if (EmbeddedActivitiesStore.getActivityPanelMode() === ActivityPanelModes.PANEL) {
r0 = value3;
} else {
rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
r1 = rootNavigationRef == null || !rootNavigationRef.isReady();
if (!r1) {
value = require(10915) /* metro dependency 10915: isChannelFocusedNative */;
value = !value.isChannelFocused();
r1 = value;
}
r0 = r1;
}
return r0;
}
function makeTextChatNotification(a0, a1, a2) { // fn#83623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11097:5477, offset: 0x01f21032, size: 2844 bytes, params: 4, frame: 31
var environment;
var r2;
var r6;
var r17;
var r11;
var r9;
var r8;
var r16;
var r5;
var r14;
var r13;
var GUILD_TEXT;
var GUILD_VOICE;
var ANNOUNCEMENT_THREAD;
var PUBLIC_THREAD;
var PRIVATE_THREAD;
var GROUP_DM;
var isManaged;
var isManaged2;
var bot;
var moduleValue;
var computeChannelName;
var value5;
var renderTitleBinding;
var value6;
var getChannel;
var parent_id;
var value7;
var THREAD_STARTER_MESSAGE;
var value8;
var getGuild;
var value9;
var value10;
var value11;
var value12;
var activity;
var application;
var LISTEN;
var length;
var PREMIUM_REFERRAL;
var poll;
var POLL_RESULT;
var components;
var ComponentType;
var CHECKPOINT_CARD;
var defaultImport3;
var unparseWithMeta;
var value14;
var emoji;
var DM;
var startsWith;
var substring;
var value15;
var value16;
var value17;
var value18;
var done;
var value19;
var position;
var value20;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var HWnMTQ;
var value21;
var embeds;
var property;
var fields;
var find;
var value22;
var value23;
var rawValue;
var value24;
var formatToPlainString;
var value25;
var ImizdM;
var question;
var text;
var value26;
var lieTqU;
var defaultImport4;
var value27;
var zY4v1B;
var name;
var value28;
var getInviteEmbedFormatStringBinding;
var SaDdmN;
var qsODhp;
var WeiMTW;
var inviteEmbedFormatStringBinding;
var value30;
var JOIN;
var JOIN_REQUEST;
var value31;
var property2;
var inviteEmbedFormatStringBinding2;
var value33;
var E8CgCh;
var c6KHWJ;
var Fy7rJN;
var inviteEmbedFormatStringBinding3;
var value35;
var value36;
var value37;
var rawDescription;
var description;
var rawTitle;
var title;
var moduleValue3;
var hasFlag;
var flags;
var IS_VOICE_MESSAGE;
var attachments;
var value38;
var defaultImport5;
var value39;
var slFYgi;
var rawName;
var HermesInternal;
var concat;
var getAvatarURL;
var guild_id;
var prototype;
var value40;
var Error;
var error;
let value = environment;
const value2 = undefined;
const defaultImport = importDefault(4617) /* metro dependency 4617: NicknameUtils */;
let getName = defaultImport.getName;
let getGuildId = a0.getGuildId;
const value3 = Reflect.apply(getGuildId, a0, []);
let id = a0.id;
const value4 = Reflect.apply(getName, defaultImport, [value3, id, a2]);
let type = a0.type;
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
reducibleJoin20: while (true) {
reducibleJoin15: while (true) {
if (GUILD_ANNOUNCEMENT === type) {
value7 = ChannelStore.getChannel(a0.parent_id);
type = a1.type;
if (type !== MessageTypes.THREAD_STARTER_MESSAGE) {
break reducibleJoin15;
}
if (value7 != null) {
value11 = renderTitle(value4, value7, ChannelStore.getChannel(value7.parent_id));
r6 = value11;
break reducibleJoin20;
}
break reducibleJoin15;
}
GUILD_TEXT = ChannelTypes.GUILD_TEXT;
if (GUILD_TEXT !== type) {
GUILD_VOICE = ChannelTypes.GUILD_VOICE;
if (GUILD_VOICE !== type) {
ANNOUNCEMENT_THREAD = ChannelTypes.ANNOUNCEMENT_THREAD;
if (ANNOUNCEMENT_THREAD !== type) {
PUBLIC_THREAD = ChannelTypes.PUBLIC_THREAD;
if (PUBLIC_THREAD !== type) {
PRIVATE_THREAD = ChannelTypes.PRIVATE_THREAD;
if (PRIVATE_THREAD !== type) {
GROUP_DM = ChannelTypes.GROUP_DM;
if (GROUP_DM !== type) {
r6 = value4;
break reducibleJoin20;
}
isManaged = a0.isManaged;
isManaged2 = Reflect.apply(isManaged, a0, []);
reducibleJoin9: while (true) {
if (isManaged2) {
bot = a2.bot;
r2 = bot;
break reducibleJoin9;
}
r2 = isManaged2;
break reducibleJoin9;
}
reducibleJoin11: while (true) {
if (r2) {
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
computeChannelName = moduleValue.computeChannelName;
value5 = value4 === Reflect.apply(computeChannelName, moduleValue, [a0,
UserStore,
RelationshipStore]);
r2 = value5;
break reducibleJoin11;
}
break reducibleJoin11;
}
if (r2) {
r6 = value4;
break reducibleJoin20;
}
value6 = renderTitle(value4, a0);
r6 = value6;
break reducibleJoin20;
}
}
}
}
}
getChannel = ChannelStore.getChannel;
parent_id = a0.parent_id;
value7 = Reflect.apply(getChannel, ChannelStore, [parent_id]);
type = a1.type;
THREAD_STARTER_MESSAGE = MessageTypes.THREAD_STARTER_MESSAGE;
if (type !== THREAD_STARTER_MESSAGE) {
break reducibleJoin15;
}
if (value7 != null) {
renderTitleBinding = renderTitle;
getChannel = ChannelStore.getChannel;
parent_id = value7.parent_id;
value11 = renderTitleBinding(value4, value7, Reflect.apply(getChannel, ChannelStore, [parent_id]));
r6 = value11;
break reducibleJoin20;
}
break reducibleJoin15;
}
if ((importDefault(5216) /* metro dependency 5216: isSystemMessage */)(a1)) {
getGuild = GuildStore.getGuild;
getGuildId = a0.getGuildId;
value9 = Reflect.apply(getGuild, GuildStore, [Reflect.apply(getGuildId, a0, [])]);
if (value9 == null) {
r6 = value4;
break reducibleJoin20;
}
value10 = renderTitle(value4, a0, value7);
r6 = value10;
break reducibleJoin20;
}
value8 = renderTitle(value4, a0, value7);
r6 = value8;
break reducibleJoin20;
}
let content = a1.content;
if ((importDefault(5216) /* metro dependency 5216: isSystemMessage */)(a1)) {
value12 = (importDefault(8233) /* metro dependency 8233: SystemMessageUtils */).stringify(a1, a0);
reducibleJoin22: while (true) {
if (value12 == null) {
value = importDefault(3) /* metro dependency 3: Logger */;
prototype = value.prototype;
value40 = Object.create(prototype, {constructor: {value: value}});
value = new value('NotificationTextUtils');
value = value instanceof Object ? value : value40;
value.warn('SystemMessageUtils.stringify(...) could not convert', {message: a1});
Error = global.Error;
prototype = Error.prototype;
value = Object.create(prototype, {constructor: {value: Error}});
error = new Error('failed to stringify system message');
value = error instanceof Object ? error : value;
throw value;
}
r17 = value12;
break reducibleJoin22;
}
} else {
r17 = content;
}
let r15 = 'sticker_items' in a1 ? a1.sticker_items : 'stickerItems' in a1 ? a1.stickerItems : a1.stickers;
const items = [];
let r4 = 'message_reference' in a1 ? (require(4845) /* metro dependency 4845: isForwardMessage */).isForwardServerMessage(a1) : (importDefault(4845) /* metro dependency 4845: isForwardMessage */)(a1);
if (r4) {
value36 = intl.string(t['9ddYKt']);
r4 = items;
r5 = value36;
} else {
activity = a1.activity;
reducibleJoin72: while (true) {
reducibleJoin38: while (true) {
if (activity == null) {
if (a1.activity != null) {
type = a1.activity.type;
LISTEN = ActivityActionTypes.LISTEN;
if (type === LISTEN) {
getInviteEmbedFormatStringBinding = getInviteEmbedFormatString;
SaDdmN = t.SaDdmN;
qsODhp = t.qsODhp;
WeiMTW = t.WeiMTW;
inviteEmbedFormatStringBinding = getInviteEmbedFormatStringBinding(a0, SaDdmN, qsODhp,
WeiMTW);
formatToPlainString = intl.formatToPlainString;
value30 = Reflect.apply(formatToPlainString, intl, [inviteEmbedFormatStringBinding,
{user: value4}]);
r4 = items;
r5 = value30;
break reducibleJoin72;
}
}
if (r15 == null) {
break reducibleJoin38;
}
if (r15.length > 0) {
formatToPlainString = intl.formatToPlainString;
zY4v1B = t.zY4v1B;
name = r15[0].name;
value28 = Reflect.apply(formatToPlainString, intl, [zY4v1B, {stickerName: name}]);
r4 = items;
r5 = value28;
break reducibleJoin72;
}
break reducibleJoin38;
}
application = a1.application;
if (application != null) {
type = a1.activity.type;
JOIN = ActivityActionTypes.JOIN;
if (type === JOIN) {
formatToPlainString = intl.formatToPlainString;
getInviteEmbedFormatStringBinding = getInviteEmbedFormatString;
E8CgCh = t.E8CgCh;
c6KHWJ = t.c6KHWJ;
Fy7rJN = t.Fy7rJN;
inviteEmbedFormatStringBinding3 = getInviteEmbedFormatStringBinding(a0, E8CgCh, c6KHWJ, Fy7rJN);
application = a1.application;
name = application.name;
value35 = Reflect.apply(formatToPlainString, intl, [inviteEmbedFormatStringBinding3,
{user: value4,
game: name}]);
r8 = value35;
} else {
type = a1.activity.type;
JOIN_REQUEST = ActivityActionTypes.JOIN_REQUEST;
value31 = '';
reducibleJoin68: while (true) {
if (type !== JOIN_REQUEST) {
r8 = value31;
break reducibleJoin68;
}
formatToPlainString = intl.formatToPlainString;
getInviteEmbedFormatStringBinding = getInviteEmbedFormatString;
property = t['/TD0la'];
property2 = t['/TD0la'];
inviteEmbedFormatStringBinding2 = getInviteEmbedFormatStringBinding(a0, property, property2,
t['/TD0la']);
application = a1.application;
name = application.name;
value33 = Reflect.apply(formatToPlainString, intl, [inviteEmbedFormatStringBinding2,
{user: value4,
game: name}]);
r8 = value33;
break reducibleJoin68;
}
}
r4 = items;
r5 = r8;
break reducibleJoin72;
}
activity = a1.activity;
if (activity != null) {
activity = a1.activity;
type = activity.type;
LISTEN = ActivityActionTypes.LISTEN;
if (type === LISTEN) {
getInviteEmbedFormatStringBinding = getInviteEmbedFormatString;
SaDdmN = t.SaDdmN;
qsODhp = t.qsODhp;
WeiMTW = t.WeiMTW;
inviteEmbedFormatStringBinding = getInviteEmbedFormatStringBinding(a0, SaDdmN, qsODhp, WeiMTW);
formatToPlainString = intl.formatToPlainString;
value30 = Reflect.apply(formatToPlainString, intl, [inviteEmbedFormatStringBinding,
{user: value4}]);
r4 = items;
r5 = value30;
break reducibleJoin72;
}
}
if (r15 == null) {
break reducibleJoin38;
}
length = r15.length;
if (length > 0) {
formatToPlainString = intl.formatToPlainString;
zY4v1B = t.zY4v1B;
name = r15[0].name;
value28 = Reflect.apply(formatToPlainString, intl, [zY4v1B, {stickerName: name}]);
r4 = items;
r5 = value28;
break reducibleJoin72;
}
break reducibleJoin38;
}
type = a1.type;
PREMIUM_REFERRAL = MessageTypes.PREMIUM_REFERRAL;
if (type === PREMIUM_REFERRAL) {
formatToPlainString = intl.formatToPlainString;
lieTqU = t.lieTqU;
defaultImport4 = importDefault(3995) /* metro dependency 3995: UserUtils */;
getName = defaultImport4.getName;
value27 = Reflect.apply(formatToPlainString, intl, [lieTqU, {username: Reflect.apply(getName,
defaultImport4,
[a2])}]);
r4 = items;
r5 = value27;
break reducibleJoin72;
}
poll = a1.poll;
if (poll != null) {
formatToPlainString = intl.formatToPlainString;
ImizdM = t.ImizdM;
poll = a1.poll;
question = poll.question;
text = question.text;
value26 = Reflect.apply(formatToPlainString, intl, [ImizdM, {question: text}]);
r4 = items;
r5 = value26;
break reducibleJoin72;
}
type = a1.type;
POLL_RESULT = MessageTypes.POLL_RESULT;
if (type === POLL_RESULT) {
embeds = a1.embeds;
reducibleJoin55: while (true) {
if (embeds == null) {
r9 = value2;
break reducibleJoin55;
}
property = embeds[0];
if (property == null) {
r9 = value2;
break reducibleJoin55;
}
fields = property.fields;
if (fields == null) {
r9 = value2;
break reducibleJoin55;
}
find = fields.find;
value22 = Reflect.apply(find, fields, [function(a0) {
return ('name' in a0 ? a0.name : a0.rawName) === 'poll_question_text';
}]);
r9 = value22;
break reducibleJoin55;
}
value23 = '';
reducibleJoin60: while (true) {
if (r9 != null) {
if ('value' in r9) {
value24 = r9.value;
r8 = value24;
} else {
rawValue = r9.rawValue;
r8 = rawValue;
}
r16 = r8;
break reducibleJoin60;
}
r16 = value23;
break reducibleJoin60;
}
formatToPlainString = intl.formatToPlainString;
property = t['9WrecI'];
value25 = Reflect.apply(formatToPlainString, intl, [property, {question: r16}]);
r4 = items;
r5 = value25;
break reducibleJoin72;
}
components = a1.components;
if (components != null) {
components = a1.components;
if (components.length > 0) {
components = a1.components;
type = components[0].type;
ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
CHECKPOINT_CARD = ComponentType.CHECKPOINT_CARD;
if (type === CHECKPOINT_CARD) {
string = intl.string;
HWnMTQ = t.HWnMTQ;
value21 = Reflect.apply(string, intl, [HWnMTQ]);
r4 = items;
r5 = value21;
break reducibleJoin72;
}
}
}
defaultImport3 = importDefault(7076) /* metro dependency 7076: MessageParser */;
unparseWithMeta = defaultImport3.unparseWithMeta;
id = a0.id;
value14 = Reflect.apply(unparseWithMeta, defaultImport3, [r17, id, true]);
content = value14.content;
emoji = value14.emoji;
length = r17.length;
if (length === 0) {
r4 = emoji;
r5 = content;
break reducibleJoin72;
}
type = a0.type;
DM = ChannelTypes.DM;
if (type !== DM) {
r4 = emoji;
r5 = content;
break reducibleJoin72;
}
bot = a2.bot;
if (bot) {
r4 = emoji;
r5 = content;
break reducibleJoin72;
}
startsWith = r17.startsWith;
if (Reflect.apply(startsWith, r17, ['> -# *'])) {
substring = content.substring;
value15 = Reflect.apply(substring, content, [0, 1]);
substring = content.substring;
value16 = value15 + Reflect.apply(substring, content, [4]);
value17 = _createForOfIteratorHelperLoose_83612(emoji);
value18 = value17();
done = value18.done;
if (!done) {
r11 = value18;
reducibleLoop49: while (true) {
value19 = r11.value;
position = value19.position;
value19.position = position - 2;
value20 = value17();
done = value20.done;
if (done) {
r4 = emoji;
r5 = value16;
break reducibleJoin72;
}
r11 = value20;
continue reducibleLoop49;
}
length = r5.length;
value37 = 0;
reducibleJoin102: while (true) {
if (value37 !== length) {
break reducibleJoin102;
}
embeds = a1.embeds;
reducibleJoin101: while (true) {
reducibleJoin86: while (true) {
if (value2 === embeds) {
hasFlag = (require(1391) /* metro dependency 1391: FlagUtils */).hasFlag;
flags = a1.flags;
if (flags != null) {
r15 = flags;
break reducibleJoin86;
}
r15 = value37;
break reducibleJoin86;
}
embeds = a1.embeds;
length = embeds.length;
if (length > value37) {
embeds = a1.embeds;
property = embeds[value37];
if ('description' in property) {
description = property.description;
r14 = description;
} else {
rawDescription = property.rawDescription;
r14 = rawDescription;
}
if ('title' in property) {
title = property.title;
r13 = title;
} else {
rawTitle = property.rawTitle;
r13 = rawTitle;
}
if (r14 != null) {
reducibleJoin100: while (true) {
if (r13 == null) {
r8 = r14;
break reducibleJoin100;
}
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value = '' + r13 + ' ' + r14;
r8 = value;
break reducibleJoin100;
}
r2 = r8;
break reducibleJoin101;
}
if (r13 != null) {
r2 = r13;
break reducibleJoin101;
}
fields = property.fields;
if (fields != null) {
fields = property.fields;
length = fields.length;
if (length > value37) {
fields = property.fields;
property = fields[value37];
if ('name' in property) {
name = property.name;
r16 = name;
} else {
rawName = property.rawName;
r16 = rawName;
}
if ('value' in property) {
r15 = property.value;
} else {
rawValue = property.rawValue;
r15 = rawValue;
}
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value = '' + r16 + ' ' + r15;
r2 = value;
break reducibleJoin101;
}
}
}
moduleValue3 = require(1391) /* metro dependency 1391: FlagUtils */;
hasFlag = moduleValue3.hasFlag;
flags = a1.flags;
if (flags != null) {
r15 = flags;
break reducibleJoin86;
}
r15 = value37;
break reducibleJoin86;
}
IS_VOICE_MESSAGE = MessageFlags.IS_VOICE_MESSAGE;
if (Reflect.apply(hasFlag, moduleValue3, [r15, IS_VOICE_MESSAGE])) {
string = intl.string;
slFYgi = t.slFYgi;
value = Reflect.apply(string, intl, [slFYgi]);
r2 = value;
break reducibleJoin101;
}
attachments = a1.attachments;
value38 = '';
if (value2 === attachments) {
r2 = value38;
break reducibleJoin101;
}
attachments = a1.attachments;
length = attachments.length;
if (length > value37) {
defaultImport5 = importDefault(8430) /* metro dependency 8430: getDisplayFilename */;
attachments = a1.attachments;
value39 = defaultImport5(attachments[value37]);
formatToPlainString = intl.formatToPlainString;
property = t['51OkwL'];
value = Reflect.apply(formatToPlainString, intl, [property, {filename: value39}]);
r2 = value;
break reducibleJoin101;
}
r2 = value38;
break reducibleJoin101;
}
r5 = r2;
break reducibleJoin102;
}
getAvatarURL = a2.getAvatarURL;
guild_id = a0.guild_id;
return {icon: Reflect.apply(getAvatarURL, a2, [guild_id, 128]), title: r6, body: r5, emoji: r4};
}
r4 = emoji;
r5 = value16;
break reducibleJoin72;
}
r4 = emoji;
r5 = content;
break reducibleJoin72;
}
}
length = r5.length;
value37 = 0;
reducibleJoin102: while (true) {
if (value37 !== length) {
break reducibleJoin102;
}
embeds = a1.embeds;
reducibleJoin101: while (true) {
reducibleJoin86: while (true) {
if (value2 === embeds) {
hasFlag = (require(1391) /* metro dependency 1391: FlagUtils */).hasFlag;
flags = a1.flags;
if (flags != null) {
r15 = flags;
break reducibleJoin86;
}
r15 = value37;
break reducibleJoin86;
}
embeds = a1.embeds;
length = embeds.length;
if (length > value37) {
embeds = a1.embeds;
property = embeds[value37];
if ('description' in property) {
description = property.description;
r14 = description;
} else {
rawDescription = property.rawDescription;
r14 = rawDescription;
}
if ('title' in property) {
title = property.title;
r13 = title;
} else {
rawTitle = property.rawTitle;
r13 = rawTitle;
}
if (r14 != null) {
reducibleJoin100: while (true) {
if (r13 == null) {
r8 = r14;
break reducibleJoin100;
}
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value = '' + r13 + ' ' + r14;
r8 = value;
break reducibleJoin100;
}
r2 = r8;
break reducibleJoin101;
}
if (r13 != null) {
r2 = r13;
break reducibleJoin101;
}
fields = property.fields;
if (fields != null) {
fields = property.fields;
length = fields.length;
if (length > value37) {
fields = property.fields;
property = fields[value37];
if ('name' in property) {
name = property.name;
r16 = name;
} else {
rawName = property.rawName;
r16 = rawName;
}
if ('value' in property) {
r15 = property.value;
} else {
rawValue = property.rawValue;
r15 = rawValue;
}
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value = '' + r16 + ' ' + r15;
r2 = value;
break reducibleJoin101;
}
}
}
moduleValue3 = require(1391) /* metro dependency 1391: FlagUtils */;
hasFlag = moduleValue3.hasFlag;
flags = a1.flags;
if (flags != null) {
r15 = flags;
break reducibleJoin86;
}
r15 = value37;
break reducibleJoin86;
}
IS_VOICE_MESSAGE = MessageFlags.IS_VOICE_MESSAGE;
if (Reflect.apply(hasFlag, moduleValue3, [r15, IS_VOICE_MESSAGE])) {
string = intl.string;
slFYgi = t.slFYgi;
value = Reflect.apply(string, intl, [slFYgi]);
r2 = value;
break reducibleJoin101;
}
attachments = a1.attachments;
value38 = '';
if (value2 === attachments) {
r2 = value38;
break reducibleJoin101;
}
attachments = a1.attachments;
length = attachments.length;
if (length > value37) {
defaultImport5 = importDefault(8430) /* metro dependency 8430: getDisplayFilename */;
attachments = a1.attachments;
value39 = defaultImport5(attachments[value37]);
formatToPlainString = intl.formatToPlainString;
property = t['51OkwL'];
value = Reflect.apply(formatToPlainString, intl, [property, {filename: value39}]);
r2 = value;
break reducibleJoin101;
}
r2 = value38;
break reducibleJoin101;
}
r5 = r2;
break reducibleJoin102;
}
getAvatarURL = a2.getAvatarURL;
return {icon: Reflect.apply(getAvatarURL, a2, [a0.guild_id, 128]), title: r6, body: r5, emoji: r4};
}
function allowInAppNotifications() { // fn#83625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11097:8943, offset: 0x01f21b75, size: 92 bytes, params: 1, frame: 13
if (UserRequiredActionStore.hasAction()) {
return false;
}
const ShowInAppNotifications = (require(3829) /* metro dependency 3829: UserSettings */).ShowInAppNotifications;
return ShowInAppNotifications.getSetting() && !(require(10916) /* metro dependency 10916: FocusModeUtils */).getFocusModeEnabled();
}
function useAllowInAppNotifications() { // fn#83626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11097:9134, offset: 0x01f21bd1, size: 124 bytes, params: 1, frame: 16
const ShowInAppNotifications = (require(3829) /* metro dependency 3829: UserSettings */).ShowInAppNotifications;
return !(require(566) /* metro dependency 566: flux */).useStateFromStores([UserRequiredActionStore], function() {
return UserRequiredActionStore.hasAction();
}) && ShowInAppNotifications.useSetting() && !(require(10916) /* metro dependency 10916: FocusModeUtils */).useFocusModeEnabled();
}