571 lines
28 KiB
TypeScript
571 lines
28 KiB
TypeScript
/* Metro module 8233; source: utils/SystemMessageUtils.tsx; dependencies: [57, 3794, 1226, 1379, 1867, 3793, 1878, 661, 1244, 21, 6713, 8234, 4617, 4805, 8235, 8237, 4634, 4625, 8238, 8239, 5059, 2] */
|
|
import SnowflakeUtils from './SnowflakeUtils.tsx'; /* Metro dependency 21 */
|
|
import Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import AuthenticationStore from '../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import ChannelStore from '../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import GuildStore from '../stores/GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import UserStore from '../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
import RelationshipStore from '../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
|
|
import MessageRecord from '../records/MessageRecord.tsx'; /* Metro dependency 3794 */
|
|
import NicknameUtils from './NicknameUtils.tsx'; /* Metro dependency 4617 */
|
|
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as AutomodNotificationEmbedTypeKeysModule from '../external/discord_common/js/shared/shared-constants/AutomodNotificationEmbedTypeKeys.tsx'; /* Metro dependency 8234 */
|
|
|
|
function _fun65852(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8418:6, offset: 0x01be1e56, size: 345 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const getSystemMessageUserJoinMobile2 = getSystemMessageUserJoinMobile;
|
|
const getSystemMessageUserPremiumGuildSubscription = function(a0) {
|
|
return require(dependencyMap[10]).astToString(require(dependencyMap[8]).intl.formatToParts(require(dependencyMap[8]).t.ihxM9x,
|
|
|
|
{username: a0, usernameOnClick: NOOP}));
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_13 = {'234395307759108106': 'https://groovy.bot/commands',
|
|
'365975655608745985': 'https://www.pokecord.com/getting-started',
|
|
'512412940897484800': 'http://jameslantz.net/smilebot'};
|
|
object = {stringify: stringify_65856, getSystemMessageUserJoin: getSystemMessageUserJoin,
|
|
getSystemMessageUserJoinMobile: getSystemMessageUserJoinMobile2,
|
|
getSystemMessageBotJoin: getSystemMessageBotJoin};
|
|
(FileImportTrackerModule).fileFinishedImporting('utils/SystemMessageUtils.tsx');
|
|
exports.default = object;
|
|
function getSystemMessageUserJoinMobile(a0) { // fn#65853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8418:395, offset: 0x01be1faf, size: 403 bytes, params: 2, frame: 15
|
|
const t = (IndexNativeModule).t;
|
|
const Jm6e0x = t.Jm6e0x;
|
|
const items2 = [Jm6e0x];
|
|
const MGRnRT = t.MGRnRT;
|
|
items2[1] = MGRnRT;
|
|
const EXOEGh = t.EXOEGh;
|
|
items2[2] = EXOEGh;
|
|
items2[3] = t['5uCTFN'];
|
|
items2[4] = t.rl45Qo;
|
|
const Bh9zpQ = t.Bh9zpQ;
|
|
items2[5] = Bh9zpQ;
|
|
const RdEy1J = t.RdEy1J;
|
|
items2[6] = RdEy1J;
|
|
items2[7] = t.qcdp00;
|
|
const F7w2Ru = t.F7w2Ru;
|
|
items2[8] = F7w2Ru;
|
|
items2[9] = t.gSyOgK;
|
|
items2[10] = t.uYgqv7;
|
|
items2[11] = t['b/1SBX'];
|
|
const LhebZF = t.LhebZF;
|
|
items2[12] = LhebZF;
|
|
let value = SnowflakeUtils;
|
|
value = value.extractTimestamp(a0);
|
|
return items2[value % items2.length];
|
|
}
|
|
|
|
function getSystemMessageUserPremiumGuildSubscriptionAchievedTier(a0, a1) { // fn#65855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8418:927, offset: 0x01be21ac, size: 174 bytes, params: 3, frame: 19
|
|
var r0;
|
|
var guildStoreBinding;
|
|
var moduleValue;
|
|
var astToString;
|
|
var intl;
|
|
const channel = ChannelStore.getChannel(a1);
|
|
if (channel == null) {
|
|
r0 = getSystemMessageUserPremiumGuildSubscription(a0);
|
|
} else {
|
|
guildStoreBinding = GuildStore;
|
|
if (guildStoreBinding.getGuild(channel.getGuildId()) == null) {
|
|
r0 = getSystemMessageUserPremiumGuildSubscription(a0);
|
|
} else {
|
|
moduleValue = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
astToString = moduleValue.astToString;
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r0 = Reflect.apply(astToString, moduleValue,
|
|
[intl.formatToParts((require(1244) /* metro dependency 1244: indexNative */).t.ihxM9x, {username: a0,
|
|
usernameOnClick: NOOP})]);
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function stringify_65856(a0, a1) { // fn#65856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8418:1232, offset: 0x01be225a, size: 3648 bytes, params: 3, frame: 34
|
|
var r2;
|
|
var r4;
|
|
var r11;
|
|
var r18;
|
|
var r16;
|
|
var name;
|
|
var r15;
|
|
var r1;
|
|
var object;
|
|
var value5;
|
|
var userStoreBinding;
|
|
var user;
|
|
var value7;
|
|
var content;
|
|
var channelStoreBinding;
|
|
var channel;
|
|
var guildStoreBinding;
|
|
var value10;
|
|
var astToString;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var formatToParts;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
var channel2;
|
|
var value12;
|
|
var iOuWPk;
|
|
var value13;
|
|
var date;
|
|
var embeds;
|
|
var value17;
|
|
var channel3;
|
|
var value21;
|
|
const AutomodNotificationEmbedTypeKeys = (AutomodNotificationEmbedTypeKeysModule).AutomodNotificationEmbedTypeKeys;
|
|
var moduleValue;
|
|
var getPrivateChannelIntegrationRemovedSystemMessageASTContent;
|
|
var moduleValue2;
|
|
var getMessageAuthor;
|
|
var moduleValue3;
|
|
var moduleValue4;
|
|
var getPrivateChannelIntegrationAddedSystemMessageASTContent;
|
|
var moduleValue5;
|
|
var moduleValue6;
|
|
var moduleValue7;
|
|
var moduleValue8;
|
|
var moduleValue9;
|
|
var purchase_notification;
|
|
var moduleValue10;
|
|
var moduleValue11;
|
|
var formatToPlainString;
|
|
var value22;
|
|
var moduleValue12;
|
|
var PJsjbP;
|
|
var intl3;
|
|
var call;
|
|
var participants;
|
|
var indexOf;
|
|
var authenticationStoreBinding;
|
|
var moduleValue13;
|
|
var QtZ0RD;
|
|
var moduleValue14;
|
|
const mentions = a0.mentions;
|
|
let value = null;
|
|
const r6 = value != mentions ? mentions : [];
|
|
const value3 = undefined;
|
|
let property = Module00057(r6, 1)[0];
|
|
if (value == property) {
|
|
r11 = value;
|
|
} else {
|
|
value5 = typeof property;
|
|
if (value5 === 'object') {
|
|
userStoreBinding = UserStore;
|
|
value7 = userStoreBinding.getUser(property.id);
|
|
r2 = value != value7 ? value7 : value;
|
|
} else if (value5 !== 'string') {
|
|
r2 = value;
|
|
} else {
|
|
user = UserStore.getUser(property);
|
|
r2 = value != user ? user : value;
|
|
}
|
|
r11 = r2;
|
|
}
|
|
const channel_id = a0.channel_id;
|
|
const defaultImport = NicknameUtils;
|
|
const getName = defaultImport.getName;
|
|
let author = a0.author;
|
|
const value8 = Reflect.apply(getName, defaultImport, [value, channel_id, author]);
|
|
const type = a0.type;
|
|
const RECIPIENT_ADD = MessageTypes.RECIPIENT_ADD;
|
|
if (RECIPIENT_ADD === type) {
|
|
if (value == r11) {
|
|
return value3;
|
|
}
|
|
moduleValue14 = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
astToString = moduleValue14.astToString;
|
|
formatToParts = intl.formatToParts;
|
|
property = t['7/Xl0S'];
|
|
object = {username: value8};
|
|
object.usernameOnClick = NOOP;
|
|
object.otherUsername = defaultImport.getName(value, channel_id, r11);
|
|
object.otherUsernameOnClick = NOOP;
|
|
return Reflect.apply(astToString, moduleValue14, [Reflect.apply(formatToParts, intl, [property, object])]);
|
|
}
|
|
const RECIPIENT_REMOVE = MessageTypes.RECIPIENT_REMOVE;
|
|
if (RECIPIENT_REMOVE === type) {
|
|
if (value == r11) {
|
|
return value3;
|
|
}
|
|
author = a0.author;
|
|
if (value == author) {
|
|
value = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
value = value.astToString(intl.formatToParts(t['Qn5+Lf'], {username: value8, usernameOnClick: NOOP}));
|
|
r1 = value;
|
|
} else if (author.id === r11.id) {
|
|
value = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
value = value.astToString(intl.formatToParts(t['Qn5+Lf'], {username: value8, usernameOnClick: NOOP}));
|
|
r1 = value;
|
|
} else {
|
|
moduleValue13 = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
astToString = moduleValue13.astToString;
|
|
formatToParts = intl.formatToParts;
|
|
QtZ0RD = t.QtZ0RD;
|
|
object = {username: value8};
|
|
object.usernameOnClick = NOOP;
|
|
object.otherUsername = defaultImport.getName(value, channel_id, r11);
|
|
object.otherUsernameOnClick = NOOP;
|
|
value = Reflect.apply(astToString, moduleValue13, [Reflect.apply(formatToParts, intl, [QtZ0RD, object])]);
|
|
r1 = value;
|
|
}
|
|
return r1;
|
|
}
|
|
const CALL = MessageTypes.CALL;
|
|
if (CALL === type) {
|
|
call = a0.call;
|
|
if (value != call) {
|
|
participants = call.participants;
|
|
indexOf = participants.indexOf;
|
|
authenticationStoreBinding = AuthenticationStore;
|
|
value = Reflect.apply(indexOf, participants, [authenticationStoreBinding.getId()]);
|
|
if (value !== -1) {
|
|
r2 = value3;
|
|
} else {
|
|
value = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
value = value.astToString(intl.formatToParts(t.DbgSA0, {username: value8, usernameOnClick: NOOP}));
|
|
r2 = value;
|
|
}
|
|
} else {
|
|
r2 = value3;
|
|
}
|
|
return r2;
|
|
}
|
|
const CHANNEL_NAME_CHANGE = MessageTypes.CHANNEL_NAME_CHANGE;
|
|
if (CHANNEL_NAME_CHANGE === type) {
|
|
value = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
return value.astToString(intl.formatToParts(a1.isForumPost() ? t['qa0e/n'] : t.XCPMEG, {username: value8,
|
|
usernameOnClick: NOOP, channelName: a0.content}));
|
|
}
|
|
const CHANNEL_ICON_CHANGE = MessageTypes.CHANNEL_ICON_CHANGE;
|
|
if (CHANNEL_ICON_CHANGE === type) {
|
|
value = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
return value.astToString(intl.formatToParts(t.wypJZ0, {username: value8, usernameOnClick: NOOP}));
|
|
}
|
|
const CHANNEL_PINNED_MESSAGE = MessageTypes.CHANNEL_PINNED_MESSAGE;
|
|
if (CHANNEL_PINNED_MESSAGE === type) {
|
|
value = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
return value.astToString(intl.formatToParts(t['/M60j0'], {username: value8, usernameOnClick: NOOP}));
|
|
}
|
|
const USER_JOIN = MessageTypes.USER_JOIN;
|
|
if (USER_JOIN === type) {
|
|
value = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
return value.astToString(intl.formatToParts(getSystemMessageUserJoinMobile(a0.id), {username: value8,
|
|
usernameOnClick: NOOP}));
|
|
}
|
|
const EMOJI_ADDED = MessageTypes.EMOJI_ADDED;
|
|
if (EMOJI_ADDED === type) {
|
|
channelStoreBinding = ChannelStore;
|
|
value22 = channelStoreBinding.getChannel(a0.channel_id);
|
|
r16 = value == value22 ? value : GuildStore.getGuild(value22.getGuildId());
|
|
moduleValue12 = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
astToString = moduleValue12.astToString;
|
|
formatToParts = intl.formatToParts;
|
|
PJsjbP = t.PJsjbP;
|
|
object = {};
|
|
object.emoji = a0.content;
|
|
name = value == r16 ? value3 : r16.name;
|
|
if (value != name) {
|
|
r15 = name;
|
|
} else {
|
|
intl3 = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r15 = intl3.string(t.dtwqPR);
|
|
}
|
|
object.guildName = r15;
|
|
return Reflect.apply(astToString, moduleValue12, [Reflect.apply(formatToParts, intl, [PJsjbP, object])]);
|
|
}
|
|
const GUILD_BOOST = MessageTypes.GUILD_BOOST;
|
|
if (GUILD_BOOST === type) {
|
|
return getSystemMessageUserPremiumGuildSubscription(value8);
|
|
}
|
|
const GUILD_BOOST_TIER_1 = MessageTypes.GUILD_BOOST_TIER_1;
|
|
if (GUILD_BOOST_TIER_1 === type) {
|
|
return getSystemMessageUserPremiumGuildSubscriptionAchievedTier(value8, channel_id);
|
|
}
|
|
const GUILD_BOOST_TIER_2 = MessageTypes.GUILD_BOOST_TIER_2;
|
|
if (GUILD_BOOST_TIER_2 === type) {
|
|
return getSystemMessageUserPremiumGuildSubscriptionAchievedTier(value8, channel_id);
|
|
}
|
|
const GUILD_BOOST_TIER_3 = MessageTypes.GUILD_BOOST_TIER_3;
|
|
if (GUILD_BOOST_TIER_3 === type) {
|
|
return getSystemMessageUserPremiumGuildSubscriptionAchievedTier(value8, channel_id);
|
|
}
|
|
const GUILD_INVITE_REMINDER = MessageTypes.GUILD_INVITE_REMINDER;
|
|
if (GUILD_INVITE_REMINDER === type) {
|
|
return intl.string(t.gxyKvr);
|
|
}
|
|
const THREAD_STARTER_MESSAGE = MessageTypes.THREAD_STARTER_MESSAGE;
|
|
if (THREAD_STARTER_MESSAGE === type) {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = t['B8H+Cl'];
|
|
object = {username: value8};
|
|
value = require(4805) /* metro dependency 4805: useChannelName */;
|
|
object.threadName = value.computeChannelName(a1, UserStore, RelationshipStore);
|
|
return Reflect.apply(formatToPlainString, intl, [property, object]);
|
|
}
|
|
const ROLE_SUBSCRIPTION_PURCHASE = MessageTypes.ROLE_SUBSCRIPTION_PURCHASE;
|
|
if (ROLE_SUBSCRIPTION_PURCHASE === type) {
|
|
if (a0 instanceof MessageRecord) {
|
|
r2 = value;
|
|
} else {
|
|
value = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
astToString = value.astToString;
|
|
moduleValue11 = require(8235) /* metro dependency 8235: GuildRoleSubscriptionSystemMessageUtils */;
|
|
value = Reflect.apply(astToString, value,
|
|
[moduleValue11.getRoleSubscriptionPurchaseSystemMessageContentMobile({username: value8,
|
|
guildId: a1.guild_id,
|
|
roleSubscriptionData: a0.role_subscription_data})]);
|
|
r2 = value;
|
|
}
|
|
return r2;
|
|
}
|
|
const PURCHASE_NOTIFICATION = MessageTypes.PURCHASE_NOTIFICATION;
|
|
if (PURCHASE_NOTIFICATION === type) {
|
|
if (a0 instanceof MessageRecord) {
|
|
r2 = value;
|
|
} else {
|
|
purchase_notification = a0.purchase_notification;
|
|
if (value == (value == purchase_notification || value == purchase_notification.guild_product_purchase ? value3 : purchase_notification.guild_product_purchase.product_name)) {
|
|
r2 = value;
|
|
} else {
|
|
value = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
astToString = value.astToString;
|
|
moduleValue10 = require(8237) /* metro dependency 8237: GuildProductSystemMessageUtils */;
|
|
value = Reflect.apply(astToString, value,
|
|
[moduleValue10.getGuildProductPurchaseSystemMessageContentMobile({username: value8,
|
|
productName: a0.purchase_notification.guild_product_purchase.product_name})]);
|
|
r2 = value;
|
|
}
|
|
}
|
|
return r2;
|
|
}
|
|
const GUILD_APPLICATION_PREMIUM_SUBSCRIPTION = MessageTypes.GUILD_APPLICATION_PREMIUM_SUBSCRIPTION;
|
|
if (GUILD_APPLICATION_PREMIUM_SUBSCRIPTION === type) {
|
|
if (a0 instanceof MessageRecord) {
|
|
return value;
|
|
}
|
|
value = require(4634) /* metro dependency 4634: useMessageAuthor */;
|
|
getMessageAuthor = value.getMessageAuthor;
|
|
moduleValue7 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
|
value = Reflect.apply(getMessageAuthor, value, [moduleValue7.createMessageRecord(a0)]);
|
|
moduleValue8 = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
astToString = moduleValue8.astToString;
|
|
moduleValue9 = require(8238) /* metro dependency 8238: ApplicationSubscriptionSystemMessageUtils */;
|
|
return Reflect.apply(astToString, moduleValue8,
|
|
[moduleValue9.getApplicationSubscriptionSystemMessageASTContent({application: a0.application,
|
|
username: value.nick})]);
|
|
}
|
|
const PRIVATE_CHANNEL_INTEGRATION_ADDED = MessageTypes.PRIVATE_CHANNEL_INTEGRATION_ADDED;
|
|
if (PRIVATE_CHANNEL_INTEGRATION_ADDED === type) {
|
|
if (a0 instanceof MessageRecord) {
|
|
r2 = value;
|
|
} else {
|
|
value = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
astToString = value.astToString;
|
|
moduleValue4 = require(8239) /* metro dependency 8239: PrivateChannelIntegrationSystemMessageUtils */;
|
|
getPrivateChannelIntegrationAddedSystemMessageASTContent = moduleValue4.getPrivateChannelIntegrationAddedSystemMessageASTContent;
|
|
object = {};
|
|
object.application = a0.application;
|
|
moduleValue5 = require(4634) /* metro dependency 4634: useMessageAuthor */;
|
|
getMessageAuthor = moduleValue5.getMessageAuthor;
|
|
moduleValue6 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
|
object.username = Reflect.apply(getMessageAuthor, moduleValue5,
|
|
[moduleValue6.createMessageRecord(a0)]).nick;
|
|
value = Reflect.apply(astToString, value,
|
|
[Reflect.apply(getPrivateChannelIntegrationAddedSystemMessageASTContent,
|
|
moduleValue4, [object])]);
|
|
r2 = value;
|
|
}
|
|
return r2;
|
|
}
|
|
const PRIVATE_CHANNEL_INTEGRATION_REMOVED = MessageTypes.PRIVATE_CHANNEL_INTEGRATION_REMOVED;
|
|
if (PRIVATE_CHANNEL_INTEGRATION_REMOVED === type) {
|
|
if (a0 instanceof MessageRecord) {
|
|
r2 = value;
|
|
} else {
|
|
value = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
astToString = value.astToString;
|
|
moduleValue = require(8239) /* metro dependency 8239: PrivateChannelIntegrationSystemMessageUtils */;
|
|
getPrivateChannelIntegrationRemovedSystemMessageASTContent = moduleValue.getPrivateChannelIntegrationRemovedSystemMessageASTContent;
|
|
object = {};
|
|
object.application = a0.application;
|
|
moduleValue2 = require(4634) /* metro dependency 4634: useMessageAuthor */;
|
|
getMessageAuthor = moduleValue2.getMessageAuthor;
|
|
moduleValue3 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
|
object.username = Reflect.apply(getMessageAuthor, moduleValue2,
|
|
[moduleValue3.createMessageRecord(a0)]).nick;
|
|
value = Reflect.apply(astToString, value,
|
|
[Reflect.apply(getPrivateChannelIntegrationRemovedSystemMessageASTContent,
|
|
moduleValue, [object])]);
|
|
r2 = value;
|
|
}
|
|
return r2;
|
|
}
|
|
const AUTO_MODERATION_ACTION = MessageTypes.AUTO_MODERATION_ACTION;
|
|
if (AUTO_MODERATION_ACTION === type) {
|
|
embeds = a0.embeds;
|
|
if (value == embeds) {
|
|
return a0.content;
|
|
}
|
|
if (embeds.some(function({type}) {
|
|
return type === MessageEmbedTypes.AUTO_MODERATION_NOTIFICATION;
|
|
})) {
|
|
value17 = a0.embeds.find(_fun65858);
|
|
r2 = value == value17 || value == value17.fields ? value3 : value17.fields.find(_fun65859);
|
|
r4 = value != r2 && 'value' in r2 ? r2.value : value3;
|
|
channel3 = ChannelStore.getChannel(channel_id);
|
|
if (value == channel3) {
|
|
r2 = value;
|
|
} else {
|
|
guildStoreBinding = GuildStore;
|
|
value21 = guildStoreBinding.getGuild(channel3.getGuildId());
|
|
if (value == value21) {
|
|
r2 = value;
|
|
} else if (AutomodNotificationEmbedTypeKeys.ACTIVITY_ALERTS_ENABLED === r4) {
|
|
value = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
value = value.astToString(intl.formatToParts(t.wt3ZUM, {guildName: value21.name}));
|
|
r2 = value;
|
|
} else if (AutomodNotificationEmbedTypeKeys.INTERACTION_BLOCKED === r4) {
|
|
value = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
value = value.astToString(intl.formatToParts(t.AkqI0g, {guildName: value21.name}));
|
|
r2 = value;
|
|
} else {
|
|
value = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
value = value.astToString(intl.formatToParts(t['a+lJKl'], {guildName: value21.name}));
|
|
r2 = value;
|
|
}
|
|
}
|
|
return r2;
|
|
}
|
|
} else {
|
|
var GUILD_INCIDENT_ALERT_MODE_ENABLED = MessageTypes.GUILD_INCIDENT_ALERT_MODE_ENABLED;
|
|
if (GUILD_INCIDENT_ALERT_MODE_ENABLED === type) {
|
|
content = a0.content;
|
|
channel2 = ChannelStore.getChannel(channel_id);
|
|
if (value == channel2) {
|
|
r2 = value;
|
|
} else {
|
|
guildStoreBinding = GuildStore;
|
|
value12 = guildStoreBinding.getGuild(channel2.getGuildId());
|
|
if (value == value12) {
|
|
r4 = value;
|
|
} else {
|
|
value = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
astToString = value.astToString;
|
|
formatToParts = intl.formatToParts;
|
|
iOuWPk = t.iOuWPk;
|
|
object = {username: value8};
|
|
object.guildName = value12.name;
|
|
value13 = '';
|
|
if (value13 === content) {
|
|
r18 = value13;
|
|
} else {
|
|
date = new global.Date();
|
|
r18 = date.toLocaleString((require(1244) /* metro dependency 1244: indexNative */).intl.currentLocale,
|
|
|
|
|
|
{'hour': 'numeric', 'minute': '2-digit'});
|
|
}
|
|
object.time = r18;
|
|
value = Reflect.apply(astToString, value, [Reflect.apply(formatToParts, intl, [iOuWPk, object])]);
|
|
r4 = value;
|
|
}
|
|
r2 = r4;
|
|
}
|
|
return r2;
|
|
}
|
|
var GUILD_INCIDENT_ALERT_MODE_DISABLED = MessageTypes.GUILD_INCIDENT_ALERT_MODE_DISABLED;
|
|
if (GUILD_INCIDENT_ALERT_MODE_DISABLED === type) {
|
|
channel = ChannelStore.getChannel(channel_id);
|
|
if (value == channel) {
|
|
r2 = value;
|
|
} else {
|
|
guildStoreBinding = GuildStore;
|
|
value10 = guildStoreBinding.getGuild(channel.getGuildId());
|
|
if (value == value10) {
|
|
r4 = value;
|
|
} else {
|
|
value = require(6713) /* metro dependency 6713: MarkupParser */;
|
|
value = value.astToString(intl.formatToParts(t.axmbpm, {username: value8,
|
|
guildName: value10.name}));
|
|
r4 = value;
|
|
}
|
|
r2 = r4;
|
|
}
|
|
return r2;
|
|
}
|
|
}
|
|
return a0.content;
|
|
function _fun65858({type}) { // fn#65858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8418:5125, offset: 0x01be309a, size: 27 bytes, params: 2, frame: 2
|
|
const AUTO_MODERATION_NOTIFICATION = MessageEmbedTypes.AUTO_MODERATION_NOTIFICATION;
|
|
return type === AUTO_MODERATION_NOTIFICATION;
|
|
}
|
|
|
|
function _fun65859(a0) { // fn#65859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8418:5219, offset: 0x01be30b5, size: 62 bytes, params: 2, frame: 13
|
|
var r0;
|
|
var name;
|
|
let value = 'name' in a0;
|
|
if (value) {
|
|
name = a0.name;
|
|
value = environment.__proto__;
|
|
value = name === (require(5059) /* metro dependency 5059: AutomodNotificationEmbedKeys */).AutomodNotificationEmbedKeys.NOTIFICATION_TYPE;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
function getSystemMessageUserJoin(a0) { // fn#65860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8418:6720, offset: 0x01be30f3, size: 403 bytes, params: 2, frame: 15
|
|
const t = (IndexNativeModule).t;
|
|
const items2 = [t['0cuj7l']];
|
|
items2[1] = t['MuW+CN'];
|
|
items2[2] = t.osqpHX;
|
|
items2[3] = t['5ToSh2'];
|
|
const JEB8ps = t.JEB8ps;
|
|
items2[4] = JEB8ps;
|
|
items2[5] = t.pkOV5T;
|
|
items2[6] = t['kRb1J+'];
|
|
items2[7] = t['EmKLY+'];
|
|
items2[8] = t.rPtBnb;
|
|
items2[9] = t['5B/ekS'];
|
|
const ESNC3Y = t.ESNC3Y;
|
|
items2[10] = ESNC3Y;
|
|
const Iw6d8w = t.Iw6d8w;
|
|
items2[11] = Iw6d8w;
|
|
items2[12] = t['WecSZ/'];
|
|
let value = SnowflakeUtils;
|
|
value = value.extractTimestamp(a0);
|
|
return items2[value % items2.length];
|
|
}
|
|
|
|
function getSystemMessageBotJoin(a0) { // fn#65861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8418:7180, offset: 0x01be3286, size: 114 bytes, params: 2, frame: 17
|
|
var r0;
|
|
var intl;
|
|
const env0_0 = a0;
|
|
const value2 = null;
|
|
if (value2 == env0_13[a0]) {
|
|
r0 = value2;
|
|
} else {
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r0 = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.xw1Ij0,
|
|
{learnOnClick: {onClick: onClick_65862}});
|
|
}
|
|
return r0;
|
|
function getSystemMessageBotJoinOnClick() { // fn#65862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8418:7299, owner: getSystemMessageBotJoin.onClick, offset: 0x01be32f8, size: 39 bytes, params: 1, frame: 12
|
|
const window = global.window;
|
|
return window.open(env1_13[env0_0]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun65852, 8233, [57, 3794, 1226, 1379, 1867, 3793, 1878, 661, 1244, 21, 6713, 8234, 4617, 4805, 8235,
|
|
8237, 4634, 4625, 8238, 8239, 5059,
|
|
2]) /* metro module 8233, dependencies: [57, 3794, 1226, 1379, 1867, 3793, 1878, 661, 1244, 21, 6713, 8234, 4617, 4805, 8235, 8237, 4634, 4625, 8238, 8239, 5059, 2] */;
|