4501 lines
198 KiB
TypeScript
4501 lines
198 KiB
TypeScript
/* Metro module 7067; source: actions/MessageActionCreators.tsx; dependencies: [57, 5, 6, 7, 4257, 7068, 7069, 7070, 7072, 7074, 4833, 6583, 4492, 1226, 1379, 7075, 1867, 4097, 4814, 3784, 4396, 4605, 7080, 1878, 661, 7082, 6934, 4503, 27, 3, 4096, 7083, 4101, 7085, 7086, 4863, 7091, 6533, 7110, 4098, 4116, 7128, 4129, 683, 7129, 1244, 1948, 4651, 694, 7141, 4242, 7142, 4821, 507, 4625, 5225, 14, 4900, 4816, 21, 1910, 1929, 4886, 4819, 7143, 7144, 7147, 7148, 3802, 7077, 1391, 6858, 7149, 7218, 4862, 7222, 7228, 7229, 7245, 672, 7246, 1909, 7153, 4002, 4647, 2] */
|
|
function _fun56137(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:6, offset: 0x013bdcd9, size: 1903 bytes, params: 8, frame: 22
|
|
var object2;
|
|
let env0_0 = require;
|
|
const closure = trackInvite;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let env0_4 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_5 = importDefault(5) /* metro dependency 5 */;
|
|
const env0_6 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_7 = importDefault(7) /* metro dependency 7 */;
|
|
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
|
|
const guildJoinRequestStore = importDefault(7068) /* metro dependency 7068: GuildJoinRequestStore */;
|
|
const guildTemplateStore = importDefault(7069) /* metro dependency 7069: GuildTemplateStore */;
|
|
const messageRoundtripTrackerStore = importDefault(7070) /* metro dependency 7070: MessageRoundtripTrackerStore */;
|
|
const poggermodeSettingsStore = importDefault(7072) /* metro dependency 7072: PoggermodeSettingsStore */;
|
|
const pendingReplyStore = importDefault(7074) /* metro dependency 7074: PendingReplyStore */;
|
|
const referencedMessageStore = importDefault(4833) /* metro dependency 4833: ReferencedMessageStore */;
|
|
const env0_15 = (require(4833) /* metro dependency 4833: ReferencedMessageStore */).ReferencedMessageState;
|
|
const stickersStore = importDefault(6583) /* metro dependency 6583: StickersStore */;
|
|
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
|
|
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const editMessageStore = importDefault(7075) /* metro dependency 7075: EditMessageStore */;
|
|
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
|
const inviteStore = importDefault(4097) /* metro dependency 4097: InviteStore */;
|
|
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
|
|
importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
|
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
|
|
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
|
|
const env0_26 = (require(7080) /* metro dependency 7080: SlowmodeStore */).SlowmodeType;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
let value = require(661) /* metro dependency 661: Constants */;
|
|
const AbortCodes = value.AbortCodes;
|
|
const env0_29 = value.AnalyticEvents;
|
|
const env0_30 = value.Endpoints;
|
|
value.Permissions;
|
|
const env0_31 = value.ChannelTypes;
|
|
const env0_32 = value.LoggingInviteTypes;
|
|
const env0_33 = value.SendTypes;
|
|
const env0_34 = value.InviteStates;
|
|
const env0_35 = value.MessageFlags;
|
|
const env0_36 = value.MAX_MESSAGES_FOR_JUMP;
|
|
const env0_37 = value.MessageTypes;
|
|
const env0_38 = value.AllowedMentionTypes;
|
|
const env0_39 = value.HelpdeskArticles;
|
|
const env0_40 = value.MarketingURLs;
|
|
const env0_41 = value.MessageReferenceTypes;
|
|
const env0_42 = value.LOCAL_BOT_ID;
|
|
const env0_43 = value.NON_USER_BOT_DISCRIMINATOR;
|
|
const env0_44 = value.MessageStates;
|
|
const env0_45 = value.ActivityActionTypes;
|
|
const env0_46 = (require(7082) /* metro dependency 7082: MessageEmbedConstants */).LinkType;
|
|
const env0_47 = (require(6934) /* metro dependency 6934: GuildTemplatesConstants */).GuildTemplateStates;
|
|
value = require(4503) /* metro dependency 4503: MessageConstants */;
|
|
const env0_48 = value.FileUploadErrorTypes;
|
|
const env0_49 = value.MessageSendLocation;
|
|
const NativeModules = (require(27) /* metro dependency 27 */).NativeModules;
|
|
const env0_50 = NativeModules.MediaPlayerManager;
|
|
value = importDefault(3) /* metro dependency 3: Logger */;
|
|
value = new value('MessageActionCreators');
|
|
value = importDefault(3) /* metro dependency 3: Logger */;
|
|
value = new value('MessageQueue');
|
|
const env0_54 = _fun56139();
|
|
object2 = {};
|
|
const SLOWMODE_RATE_LIMITED = AbortCodes.SLOWMODE_RATE_LIMITED;
|
|
object2[SLOWMODE_RATE_LIMITED] = {messageName: 'SLOWMODE_RATE_LIMITED', messageGetter: function(a0) {
|
|
var intl = require(dependencyMap[45]).intl;
|
|
var IWntYg = require(dependencyMap[45]).t.IWntYg;
|
|
return intl.formatToPlainString(IWntYg, {seconds: a0.rateLimitPerUser});
|
|
}};
|
|
const INVALID_MESSAGE_SEND_NO_MUTUAL_GUILDS = AbortCodes.INVALID_MESSAGE_SEND_NO_MUTUAL_GUILDS;
|
|
object2[INVALID_MESSAGE_SEND_NO_MUTUAL_GUILDS] = {messageName: 'INVALID_MESSAGE_SEND_NO_MUTUAL_GUILDS',
|
|
messageGetter: messageGetter_56143};
|
|
const INVALID_MESSAGE_SEND_USER = AbortCodes.INVALID_MESSAGE_SEND_USER;
|
|
object2[INVALID_MESSAGE_SEND_USER] = {messageName: 'INVALID_MESSAGE_SEND_USER', messageGetter: function() {
|
|
var intl = require(dependencyMap[45]).intl;
|
|
var SkGL7l = require(dependencyMap[45]).t.SkGL7l;
|
|
var object = {};
|
|
object.helpUrl = importDefault(dependencyMap[46]).getArticleURL(HelpdeskArticles.DM_COULD_NOT_BE_DELIVERED);
|
|
return intl.formatToPlainString(SkGL7l, object);
|
|
}};
|
|
const TOO_MANY_THREADS = AbortCodes.TOO_MANY_THREADS;
|
|
object2[TOO_MANY_THREADS] = {messageName: 'TOO_MANY_THREADS', messageGetter: messageGetter_56146};
|
|
const TOO_MANY_ANNOUNCEMENT_THREADS = AbortCodes.TOO_MANY_ANNOUNCEMENT_THREADS;
|
|
object2[TOO_MANY_ANNOUNCEMENT_THREADS] = {messageName: 'TOO_MANY_ANNOUNCEMENT_THREADS', messageGetter: function() {
|
|
return require(dependencyMap[45]).intl.string(require(dependencyMap[45]).t['aY+lLC']);
|
|
}};
|
|
const HARMFUL_LINK_MESSAGE_BLOCKED = AbortCodes.HARMFUL_LINK_MESSAGE_BLOCKED;
|
|
object2[HARMFUL_LINK_MESSAGE_BLOCKED] = {messageName: 'HARMFUL_LINK_MESSAGE_BLOCKED', messageGetter: function() {
|
|
return require(dependencyMap[45]).intl.formatToPlainString(require(dependencyMap[45]).t.zSG3Qy,
|
|
{helpUrl: MarketingURLs.HARMFUL_LINKS});
|
|
}};
|
|
const HARMFUL_URL_BLOCKED = AbortCodes.HARMFUL_URL_BLOCKED;
|
|
object2[HARMFUL_URL_BLOCKED] = {messageName: 'HARMFUL_URL_BLOCKED', messageGetter: function() {
|
|
return require(dependencyMap[45]).intl.string(require(dependencyMap[45]).t.WxX2Fd);
|
|
}};
|
|
const EMAIL_VERIFICATION_REQUIRED = AbortCodes.EMAIL_VERIFICATION_REQUIRED;
|
|
object2[EMAIL_VERIFICATION_REQUIRED] = {messageName: 'BOT_REQUIRES_EMAIL_VERIFICATION', messageGetter: function() {
|
|
return require(dependencyMap[45]).intl.string(require(dependencyMap[45]).t.k1Cjqr);
|
|
}};
|
|
const GUILD_MESSAGE_UPDATE_RATE_LIMIT_EXCEEDED = AbortCodes.GUILD_MESSAGE_UPDATE_RATE_LIMIT_EXCEEDED;
|
|
object2[GUILD_MESSAGE_UPDATE_RATE_LIMIT_EXCEEDED] = {messageName: 'GUILD_MESSAGE_UPDATE_RATE_LIMIT_EXCEEDED',
|
|
messageGetter: function() {
|
|
return require(dependencyMap[45]).intl.string(require(dependencyMap[45]).t.Z5SUuv);
|
|
}};
|
|
const RATE_LIMIT_DM_OPEN = AbortCodes.RATE_LIMIT_DM_OPEN;
|
|
object2[RATE_LIMIT_DM_OPEN] = {messageName: 'BOT_DM_RATE_LIMITED', messageGetter: function() {
|
|
return require(dependencyMap[45]).intl.string(require(dependencyMap[45]).t.E8nbNb);
|
|
}};
|
|
const SEND_MESSAGE_TEMPORARILY_DISABLED = AbortCodes.SEND_MESSAGE_TEMPORARILY_DISABLED;
|
|
object2[SEND_MESSAGE_TEMPORARILY_DISABLED] = {messageName: 'BOT_DM_SEND_MESSAGE_TEMPORARILY_DISABLED',
|
|
messageGetter: function() {
|
|
return require(dependencyMap[45]).intl.string(require(dependencyMap[45]).t.aRUbah);
|
|
}};
|
|
const INVALID_MESSAGE_SEND_GAME_FRIEND_DM = AbortCodes.INVALID_MESSAGE_SEND_GAME_FRIEND_DM;
|
|
object2[INVALID_MESSAGE_SEND_GAME_FRIEND_DM] = {messageName: 'BOT_DM_SEND_MESSAGE_INVALID_FOR_GAME_FRIEND',
|
|
messageGetter: function() {
|
|
return require(dependencyMap[45]).intl.string(require(dependencyMap[45]).t['/meGhR']);
|
|
}};
|
|
const INVALID_MESSAGE_SEND_PROVISIONAL_ACCOUNT_OFFLINE = AbortCodes.INVALID_MESSAGE_SEND_PROVISIONAL_ACCOUNT_OFFLINE;
|
|
object2[INVALID_MESSAGE_SEND_PROVISIONAL_ACCOUNT_OFFLINE] = {messageName: 'BOT_DM_SEND_MESSAGE_INVALID_OFFLINE_PROVISIONAL_ACCOUNT',
|
|
messageGetter: function() {
|
|
return require(dependencyMap[45]).intl.string(require(dependencyMap[45]).t.Oc1Zjw);
|
|
}};
|
|
const TOTAL_ATTACHMENT_SIZE_TOO_LARGE = AbortCodes.TOTAL_ATTACHMENT_SIZE_TOO_LARGE;
|
|
object2[TOTAL_ATTACHMENT_SIZE_TOO_LARGE] = {messageName: 'TOTAL_ATTACHMENT_SIZE_TOO_LARGE',
|
|
messageGetter: function() {
|
|
var intl = require(dependencyMap[45]).intl;
|
|
var DYFPg2 = require(dependencyMap[45]).t.DYFPg2;
|
|
return intl.formatToPlainString(DYFPg2, {maxSizeMb: require(dependencyMap[47]).MAX_TOTAL_ATTACHMENT_SIZE_MB});
|
|
}};
|
|
const CLOUD_UPLOAD_NOT_FOUND = AbortCodes.CLOUD_UPLOAD_NOT_FOUND;
|
|
object2[CLOUD_UPLOAD_NOT_FOUND] = {messageName: 'CLOUD_UPLOAD_NOT_FOUND', messageGetter: function() {
|
|
return require(dependencyMap[45]).intl.string(require(dependencyMap[45]).t.bQldfH);
|
|
}};
|
|
const INVALID_PERMISSIONS = AbortCodes.INVALID_PERMISSIONS;
|
|
object2[INVALID_PERMISSIONS] = {messageName: 'INVALID_PERMISSIONS', messageGetter: function() {
|
|
return require(dependencyMap[45]).intl.string(require(dependencyMap[45]).t.zl4Weq);
|
|
}};
|
|
object2 = {receiveMessage: receiveMessage, sendBotMessage: sendBotMessage,
|
|
sendNitroSystemMessage: sendNitroSystemMessage, sendGiftingPromptSystemMessage: sendGiftingPromptSystemMessage,
|
|
sendGuildBoostUpsellSystemMessage: sendGuildBoostUpsellSystemMessage, sendClydeError: sendClydeError,
|
|
sendExplicitMediaClydeError: sendExplicitMediaClydeError, truncateMessages: truncateMessages,
|
|
clearChannel: clearChannel_56170, jumpToPresent: jumpToPresent, trackJump: function(a0, a1, a2, a3) {
|
|
var defaultImport = importDefault(dependencyMap[35]);
|
|
var JUMP = AnalyticEvents.JUMP;
|
|
var object = {context: a2, channel_id: a0, message_id: a1};
|
|
copyDataProperties(object, a3, a1);
|
|
defaultImport.trackWithMetadata(JUMP, object);
|
|
}, jumpToMessage: jumpToMessage, focusMessage: focusMessage, fetchMessage: fetchMessage,
|
|
fetchMessages: fetchMessages, fetchLocalMessages: function(a0, a1, a2, a3, a4, a5) {
|
|
var env0_0 = a0;
|
|
var env0_1 = a1;
|
|
var env0_2 = a2;
|
|
var env0_3 = a3;
|
|
var env0_4 = a4;
|
|
return a5(_fun56185)();
|
|
}, fetchNewLocalMessages: fetchNewLocalMessages, _tryFetchMessagesCached: _tryFetchMessagesCached,
|
|
sendMessage: sendMessage, getSendMessageOptionsForReply: getSendMessageOptionsForReply,
|
|
getSendMessageOptionsForStickers: function({isGif, stickers}) {
|
|
return stickers == null || stickers.length === 0 || isGif ? {} : {stickerIds: stickers};
|
|
}, getSendMessageOptionsForScheduledMessage: function({scheduledTimestamp}) {
|
|
return scheduledTimestamp == null ? {} : {scheduledTimestamp: scheduledTimestamp};
|
|
}, getSendMessageOptionsForAlsoForwardToChannel: function(a0) {
|
|
return {alsoForwardToChannelId: a0.alsoForwardToChannelId};
|
|
}, getSendMessageOptions: getSendMessageOptions, sendInvite: sendInvite, sendActivityBookmark: sendActivityBookmark,
|
|
sendStickers: sendStickers, sendGreetMessage: sendGreetMessage, sendPollMessage: sendPollMessage,
|
|
validateMessage: validateMessage, _sendMessage: _sendMessage, startEditMessage: startEditMessage,
|
|
startEditMessageRecord: startEditMessageRecord, updateEditMessage: updateEditMessage,
|
|
endEditMessage: endEditMessage, editMessage: editMessage, suppressEmbeds: suppressEmbeds,
|
|
patchMessageGuildOfficial: patchMessageGuildOfficial, patchMessageAttachments: patchMessageAttachments,
|
|
deleteMessage: deleteMessage_56251, dismissAutomatedMessage: dismissAutomatedMessage,
|
|
revealMessage: revealMessage, crosspostMessage: crosspostMessage, trackInvite: closure};
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/MessageActionCreators.tsx');
|
|
exports.default = object2;
|
|
}
|
|
|
|
function trackInvite({inviteKey, channelId, messageId, location, inviteAnalyticsMetadata, overrideProperties}) { // fn#56138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:1171, offset: 0x013be448, size: 1242 bytes, params: 2, frame: 28
|
|
var r10;
|
|
var r14;
|
|
var object4;
|
|
var moduleValue3;
|
|
var object5;
|
|
var baseCode;
|
|
var moduleValue4;
|
|
var getInviteInstanceId;
|
|
var defaultImport;
|
|
var channel;
|
|
var lastActiveStream;
|
|
var STREAM;
|
|
var streamerApplication;
|
|
var suggestionData;
|
|
var object6;
|
|
var moduleValue6;
|
|
var defaultImport2;
|
|
const r2 = overrideProperties !== undefined ? overrideProperties : {};
|
|
const id2 = AuthenticationStore.getId();
|
|
const invite = InviteStore.getInvite(inviteKey);
|
|
const extraDataFromInviteKey = (require(4098) /* metro dependency 4098: InviteCodeUtils */).parseExtraDataFromInviteKey(inviteKey);
|
|
const r7 = invite != null && (require(4116) /* metro dependency 4116: InviteTypeUtils */).isEmbeddedApplicationInvite(invite);
|
|
let id = invite == null || invite.target_application == null ? undefined : invite.target_application.id;
|
|
if (id != null && r7) {
|
|
moduleValue3 = require(7086) /* metro dependency 7086: appMessageEmbedTracking */;
|
|
moduleValue3.trackAppEmbedLinkSent(id, LinkType.ACTIVITY_INVITE, id2);
|
|
}
|
|
const channel2 = ChannelStore.getChannel(channelId);
|
|
if (channel2 != null) {
|
|
r14 = channel2.isMultiUserDM() ? LoggingInviteTypes.GDM_INVITE : channel2.isPrivate() ? null : LoggingInviteTypes.SERVER_INVITE;
|
|
object4 = {};
|
|
if (invite == null) {
|
|
r10 = r14;
|
|
} else if (invite.state !== InviteStates.RESOLVED) {
|
|
r10 = r14;
|
|
} else {
|
|
channel = invite.channel;
|
|
if (channel == null) {
|
|
r10 = r14;
|
|
} else {
|
|
channel = invite.channel;
|
|
id = channel.id;
|
|
object4.invite_channel_id = id;
|
|
id = invite.guild?.id;
|
|
object4.invite_guild_id = id;
|
|
object4.invite_channel_type = channel.type;
|
|
if (invite.inviter != null) {
|
|
object4.invite_inviter_id = invite.inviter.id;
|
|
}
|
|
if (invite.target_application != null) {
|
|
object4.application_id = invite.target_application.id;
|
|
}
|
|
lastActiveStream = ApplicationStreamingStore.getLastActiveStream();
|
|
if (lastActiveStream == null) {
|
|
r10 = r14;
|
|
} else if (lastActiveStream.channelId !== channel.id) {
|
|
r10 = r14;
|
|
} else {
|
|
STREAM = LoggingInviteTypes.STREAM;
|
|
object4.destination_user_id = lastActiveStream.ownerId;
|
|
streamerApplication = (require(7128) /* metro dependency 7128: StreamerApplicationSelectors */).getStreamerApplication(lastActiveStream,
|
|
|
|
|
|
|
|
|
|
PresenceStore);
|
|
object4.application_id = streamerApplication != null ? streamerApplication.id : null;
|
|
r10 = STREAM;
|
|
}
|
|
}
|
|
}
|
|
if (inviteAnalyticsMetadata != null) {
|
|
suggestionData = inviteAnalyticsMetadata.suggestionData;
|
|
if (suggestionData != null) {
|
|
suggestionData = inviteAnalyticsMetadata.suggestionData;
|
|
object4.is_suggested = suggestionData.isAffinitySuggestion;
|
|
suggestionData = inviteAnalyticsMetadata.suggestionData;
|
|
object4.row_num = suggestionData.rowNum;
|
|
suggestionData = inviteAnalyticsMetadata.suggestionData;
|
|
object4.num_total = suggestionData.numTotal;
|
|
suggestionData = inviteAnalyticsMetadata.suggestionData;
|
|
object4.num_affinity_connections = suggestionData.numAffinityConnections;
|
|
suggestionData = inviteAnalyticsMetadata.suggestionData;
|
|
object4.is_filtered = suggestionData.isFiltered;
|
|
}
|
|
object4.source = inviteAnalyticsMetadata.source;
|
|
}
|
|
object6 = {};
|
|
copyDataProperties(object6, object4, undefined);
|
|
object6['location'] = location;
|
|
object6['invite_type'] = r10;
|
|
baseCode = extraDataFromInviteKey.baseCode;
|
|
object6['invite_code'] = baseCode;
|
|
object6['guild_id'] = channel2.getGuildId();
|
|
id = channel2.id;
|
|
object6['channel_id'] = id;
|
|
object6['message_id'] = messageId;
|
|
object6['send_type'] = SendTypes.DIRECT_MESSAGE;
|
|
object6['invite_guild_scheduled_event_id'] = extraDataFromInviteKey.guildScheduledEventId;
|
|
moduleValue6 = require(4098) /* metro dependency 4098: InviteCodeUtils */;
|
|
getInviteInstanceId = moduleValue6.getInviteInstanceId;
|
|
baseCode = extraDataFromInviteKey.baseCode;
|
|
object6['invite_instance_id'] = Reflect.apply(getInviteInstanceId, moduleValue6, [baseCode, messageId]) ?? null;
|
|
copyDataProperties(object6, r2, undefined);
|
|
defaultImport2 = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
|
defaultImport2.trackWithMetadata(AnalyticEvents.INVITE_SENT, object6);
|
|
} else {
|
|
object4 = {};
|
|
if (invite != null) {
|
|
if (invite.state === InviteStates.RESOLVED) {
|
|
if (invite.inviter != null) {
|
|
object4.invite_inviter_id = invite.inviter.id;
|
|
if (invite.target_application != null) {
|
|
object4.application_id = invite.target_application.id;
|
|
}
|
|
object5 = {};
|
|
copyDataProperties(object5, object4, undefined);
|
|
object5['location'] = location;
|
|
object5['invite_type'] = LoggingInviteTypes.FRIEND_INVITE;
|
|
baseCode = extraDataFromInviteKey.baseCode;
|
|
object5['invite_code'] = baseCode;
|
|
object5['message_id'] = messageId;
|
|
object5['send_type'] = SendTypes.DIRECT_MESSAGE;
|
|
object5['invite_guild_scheduled_event_id'] = extraDataFromInviteKey.guildScheduledEventId;
|
|
moduleValue4 = require(4098) /* metro dependency 4098: InviteCodeUtils */;
|
|
getInviteInstanceId = moduleValue4.getInviteInstanceId;
|
|
baseCode = extraDataFromInviteKey.baseCode;
|
|
object5['invite_instance_id'] = Reflect.apply(getInviteInstanceId, moduleValue4, [baseCode,
|
|
messageId]) ?? null;
|
|
copyDataProperties(object5, r2, undefined);
|
|
defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
|
defaultImport.trackWithMetadata(AnalyticEvents.INVITE_SENT, object5);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun56139() { // fn#56139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:1024, offset: 0x013be922, size: 57 bytes, params: 1, frame: 14
|
|
return env0_7(RemoteFetch, [{key: 'markComplete', value: function() {
|
|
this.completed = true;
|
|
}}]);
|
|
}
|
|
|
|
function messageGetter_56143(a0) { // fn#56143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:3498, offset: 0x013be9dc, size: 243 bytes, params: 2, frame: 17
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
|
const getArticleURL = defaultImport.getArticleURL;
|
|
const DM_COULD_NOT_BE_DELIVERED = HelpdeskArticles.DM_COULD_NOT_BE_DELIVERED;
|
|
const value2 = Reflect.apply(getArticleURL, defaultImport, [DM_COULD_NOT_BE_DELIVERED]);
|
|
const r3 = a0.rawRecipients ?? [];
|
|
return a0.isDM() ? r3.length !== 1 ? intl.formatToPlainString(t.llTkqr, {helpUrl: value2}) : r3.some(function(a0) {
|
|
return a0.bot;
|
|
}) ? intl.formatToPlainString(t.SkGL7l, {helpUrl: value2}) : intl.formatToPlainString(t.llTkqr,
|
|
{helpUrl: value2}) : intl.formatToPlainString(t.llTkqr, {helpUrl: value2});
|
|
}
|
|
|
|
function messageGetter_56146(a0) { // fn#56146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:4049, offset: 0x013beb45, size: 157 bytes, params: 2, frame: 15
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
return a0.isForumLikeChannel() || a0.isForumPost() ? intl.string(t['/jUd2+']) : intl.string(t['5EMPA7']);
|
|
}
|
|
|
|
function receiveMessage(a0, a1) { // fn#56159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:5977, offset: 0x013bef08, size: 96 bytes, params: 3, frame: 15
|
|
let value = a2;
|
|
const value2 = a3;
|
|
const r5 = value !== undefined ? value : false;
|
|
const r4 = value2 !== undefined ? value2 : {};
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.dispatch({type: 'MESSAGE_CREATE', channelId: a0, message: a1, optimistic: r5, sendMessageOptions: r4,
|
|
isPushNotification: false});
|
|
}
|
|
|
|
function sendBotMessage(a0, a1, a2, a3) { // fn#56160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:6129, offset: 0x013bef68, size: 156 bytes, params: 5, frame: 18
|
|
var defaultImport;
|
|
if (a2 != null) {
|
|
defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
|
defaultImport.trackWithMetadata(AnalyticEvents.AUTOMATED_MESSAGE_RECEIVED, {message_author: 'Clyde',
|
|
message_name: a2});
|
|
}
|
|
const binding = env0_56;
|
|
const receiveMessage = binding.receiveMessage;
|
|
const value = require(7141) /* metro dependency 7141: createMessage */;
|
|
Reflect.apply(receiveMessage, binding, [a0, value.createBotMessage({messageId: a3, channelId: a0, content: a1,
|
|
loggingName: a2})]);
|
|
}
|
|
|
|
function sendNitroSystemMessage(a0, a1, a2) { // fn#56161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:6358, offset: 0x013bf004, size: 179 bytes, params: 4, frame: 18
|
|
var object2;
|
|
const defaultImport = importDefault(7141) /* metro dependency 7141: createMessage */;
|
|
const NITRO_NOTIFICATION = MessageTypes.NITRO_NOTIFICATION;
|
|
const EPHEMERAL = MessageFlags.EPHEMERAL;
|
|
const value2 = defaultImport({channelId: a0, nonce: a2, type: NITRO_NOTIFICATION, content: a1, flags: EPHEMERAL,
|
|
author: {'id': null, 'username': 'Nitro Notification', 'discriminator': null, 'avatar': 'nitro', 'bot': true,
|
|
id: LOCAL_BOT_ID, discriminator: NON_USER_BOT_DISCRIMINATOR}});
|
|
const binding = env0_56;
|
|
const receiveMessage = binding.receiveMessage;
|
|
object2 = {};
|
|
copyDataProperties(object2, value2, undefined);
|
|
const SENT = MessageStates.SENT;
|
|
object2['state'] = SENT;
|
|
object2['channel_id'] = a0;
|
|
Reflect.apply(receiveMessage, binding, [a0, object2, true]);
|
|
}
|
|
|
|
function sendGiftingPromptSystemMessage(a0, a1) { // fn#56162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:6620, offset: 0x013bf0b7, size: 171 bytes, params: 3, frame: 18
|
|
var object2;
|
|
const defaultImport = importDefault(7141) /* metro dependency 7141: createMessage */;
|
|
const GIFTING_PROMPT = MessageTypes.GIFTING_PROMPT;
|
|
const EPHEMERAL = MessageFlags.EPHEMERAL;
|
|
const value2 = defaultImport({channelId: a0, type: GIFTING_PROMPT, content: '', flags: EPHEMERAL,
|
|
author: {'id': null, 'username': 'Gifting Prompt', 'discriminator': null, 'avatar': 'gifting_prompt',
|
|
'bot': true, id: LOCAL_BOT_ID, discriminator: NON_USER_BOT_DISCRIMINATOR}, giftingPrompt: a1});
|
|
const binding = env0_56;
|
|
const receiveMessage = binding.receiveMessage;
|
|
object2 = {};
|
|
copyDataProperties(object2, value2, undefined);
|
|
const SENT = MessageStates.SENT;
|
|
object2['state'] = SENT;
|
|
Reflect.apply(receiveMessage, binding, [a0, object2, true]);
|
|
}
|
|
|
|
function sendGuildBoostUpsellSystemMessage(a0, a1) { // fn#56163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:6885, offset: 0x013bf162, size: 171 bytes, params: 3, frame: 18
|
|
var object2;
|
|
const defaultImport = importDefault(7141) /* metro dependency 7141: createMessage */;
|
|
const GUILD_BOOST_UPSELL = MessageTypes.GUILD_BOOST_UPSELL;
|
|
const EPHEMERAL = MessageFlags.EPHEMERAL;
|
|
const value2 = defaultImport({channelId: a0, type: GUILD_BOOST_UPSELL, content: '', flags: EPHEMERAL,
|
|
author: {'id': null, 'username': 'Guild Boost Upsell', 'discriminator': null, 'avatar': 'guild_boost_upsell',
|
|
'bot': true, id: LOCAL_BOT_ID, discriminator: NON_USER_BOT_DISCRIMINATOR}, boostingPrompt: a1});
|
|
const binding = env0_56;
|
|
const receiveMessage = binding.receiveMessage;
|
|
object2 = {};
|
|
copyDataProperties(object2, value2, undefined);
|
|
const SENT = MessageStates.SENT;
|
|
object2['state'] = SENT;
|
|
Reflect.apply(receiveMessage, binding, [a0, object2, true]);
|
|
}
|
|
|
|
function sendClydeError(a0) { // fn#56164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:7166, offset: 0x013bf20d, size: 241 bytes, params: 2, frame: 25
|
|
var property;
|
|
var binding;
|
|
var sendBotMessage;
|
|
var intl;
|
|
var formatToPlainString;
|
|
var SkGL7l;
|
|
var defaultImport;
|
|
const value = a1;
|
|
const r11 = value !== undefined ? value : 0;
|
|
const channel = ChannelStore.getChannel(a0);
|
|
if (channel != null) {
|
|
property = env0_55[r11];
|
|
if (property != null) {
|
|
binding = env0_56;
|
|
binding.sendBotMessage(a0, property.messageGetter(channel), property.messageName);
|
|
} else {
|
|
binding = env0_56;
|
|
sendBotMessage = binding.sendBotMessage;
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
SkGL7l = (require(1244) /* metro dependency 1244: indexNative */).t.SkGL7l;
|
|
defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
|
Reflect.apply(sendBotMessage, binding, [a0, Reflect.apply(formatToPlainString, intl, [SkGL7l,
|
|
{helpUrl: defaultImport.getArticleURL(HelpdeskArticles.DM_COULD_NOT_BE_DELIVERED)}]),
|
|
'SEND_FAILED (' + r11 + ')']);
|
|
}
|
|
}
|
|
}
|
|
|
|
function sendExplicitMediaClydeError(a0, a1, a2) { // fn#56165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:7455, offset: 0x013bf2fe, size: 369 bytes, params: 4, frame: 24
|
|
var moduleValue;
|
|
var match;
|
|
var object2;
|
|
var value6;
|
|
var message;
|
|
var messageName;
|
|
var nonce;
|
|
var moduleValue3;
|
|
var trackMediaRedactionAction;
|
|
var value;
|
|
const channel = ChannelStore.getChannel(a0);
|
|
if (channel != null) {
|
|
moduleValue = require(4242) /* metro dependency 4242 */;
|
|
match = moduleValue.match;
|
|
object2 = {};
|
|
object2.isDM = channel.isDM();
|
|
object2.isGDM = channel.isGroupDM();
|
|
value6 = Reflect.apply(match, moduleValue, [object2]).with({isDM: true}, function() {
|
|
var object = {};
|
|
object.message = require(dependencyMap[45]).intl.string(require(dependencyMap[45]).t['mktny/']);
|
|
object.messageName = 'BOT_DM_EXPLICIT_CONTENT';
|
|
return object;
|
|
}).with({'isDM': false, 'isGDM': true}, _fun56167).otherwise(_fun56168);
|
|
message = value6.message;
|
|
messageName = value6.messageName;
|
|
nonce = (require(7142) /* metro dependency 7142: createNonce */).createNonce();
|
|
env0_56.sendBotMessage(a0, message, messageName, nonce);
|
|
moduleValue3 = require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */;
|
|
trackMediaRedactionAction = moduleValue3.trackMediaRedactionAction;
|
|
object2 = {};
|
|
object2.action = (require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).TrackMediaRedactionActionType.EXPLICIT_MEDIA_FALSE_POSITIVE_CLYDE_MESSAGE_SENT;
|
|
object2.messageId = nonce;
|
|
object2.channelId = a0;
|
|
object2.context = a2;
|
|
Reflect.apply(trackMediaRedactionAction, moduleValue3, [object2]);
|
|
if (a1 != null && a1.length > 0) {
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.dispatch({type: 'MESSAGE_EXPLICIT_CONTENT_FP_CREATE', messageId: nonce, channelId: a0,
|
|
attachments: a1});
|
|
}
|
|
}
|
|
}
|
|
|
|
function truncateMessages(a0, a1, a2) { // fn#56169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:8303, offset: 0x013bf55c, size: 72 bytes, params: 4, frame: 13
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'TRUNCATE_MESSAGES', channelId: a0,
|
|
truncateBottom: a1, truncateTop: a2});
|
|
}
|
|
|
|
function clearChannel_56170(a0) { // fn#56170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:8417, offset: 0x013bf5a4, size: 54 bytes, params: 2, frame: 13
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CLEAR_MESSAGES', channelId: a0});
|
|
}
|
|
|
|
function jumpToPresent(a0, a1) { // fn#56171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:8489, offset: 0x013bf5da, size: 154 bytes, params: 3, frame: 18
|
|
var value;
|
|
let binding = env0_56;
|
|
binding.trackJump(a0, null, 'Present');
|
|
const object2 = {present: true};
|
|
if (MessageStore.hasPresent(a0)) {
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.dispatch({type: 'LOAD_MESSAGES_SUCCESS_CACHED', jump: object2, channelId: a0, limit: a1});
|
|
} else {
|
|
binding = env0_56;
|
|
binding.fetchMessages({channelId: a0, limit: a1, jump: object2});
|
|
}
|
|
}
|
|
|
|
function jumpToMessage({channelId, messageId, flash, offset, context, extraProperties, isPreload, returnMessageId, skipLocalFetch, jumpType, avoidInitialScroll}) { // fn#56173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:8818, offset: 0x013bf6c7, size: 247 bytes, params: 2, frame: 24
|
|
flash = !(flash === undefined) && flash;
|
|
extraProperties = extraProperties === undefined ? null : extraProperties;
|
|
if (typeof context === 'string') {
|
|
env0_56.trackJump(channelId, messageId, context, extraProperties);
|
|
}
|
|
if (!(MediaPlayerManager == null || MediaPlayerManager.pauseAllMediaPlayers == null)) {
|
|
MediaPlayerManager.pauseAllMediaPlayers();
|
|
}
|
|
return env0_56.fetchMessages({channelId: channelId, limit: MAX_MESSAGES_FOR_JUMP, jump: {messageId: messageId,
|
|
flash: flash, offset: offset, returnMessageId: returnMessageId, jumpType: jumpType}, isPreload: isPreload,
|
|
skipLocalFetch: skipLocalFetch, avoidInitialScroll: avoidInitialScroll});
|
|
}
|
|
|
|
function focusMessage({channelId, messageId}) { // fn#56174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:9245, offset: 0x013bf7be, size: 60 bytes, params: 2, frame: 14
|
|
env0_56.fetchMessages({channelId: channelId, limit: MAX_MESSAGES_FOR_JUMP, focus: {messageId: messageId}});
|
|
}
|
|
|
|
function fetchMessage({channelId, messageId}) { // fn#56175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:9359, offset: 0x013bf7fa, size: 48 bytes, params: 2, frame: 11
|
|
return env0_5(_fun56177)();
|
|
}
|
|
|
|
function fetchMessages({channelId, before, after, limit, jump, focus, isPreload, skipLocalFetch, truncate, forICYMI, avoidInitialScroll, feature, fetchKey}) { // fn#56178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:9596, offset: 0x013bf8f5, size: 833 bytes, params: 2, frame: 39
|
|
var r4;
|
|
var messageId;
|
|
const FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID = (require(5225) /* metro dependency 5225: FakePlaceholderPrivateChannel */).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID;
|
|
var binding;
|
|
var _tryFetchMessagesCached;
|
|
var object2;
|
|
var defaultImport;
|
|
var recordChannelFetchStart;
|
|
var value9;
|
|
var binding2;
|
|
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
|
var get;
|
|
let value = undefined;
|
|
const channel = ChannelStore.getChannel(channelId);
|
|
const env0_9 = GatewayConnectionStore.isConnectedOrOverlay();
|
|
const Date = global.Date;
|
|
const value4 = Date.now();
|
|
if (channel == null) {
|
|
if (channelId === FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID) {
|
|
return value;
|
|
}
|
|
binding = env0_51;
|
|
binding.log('Fetching messages for ' + channelId + ' between ' + after + ' and ' + before + '. jump=' + global.JSON.stringify(jump));
|
|
binding = env0_56;
|
|
_tryFetchMessagesCached = binding._tryFetchMessagesCached;
|
|
object2 = {channelId: channelId, before: before, after: after, limit: limit, jump: jump, focus: focus,
|
|
truncate: truncate};
|
|
if (Reflect.apply(_tryFetchMessagesCached, binding, [object2])) {
|
|
return value;
|
|
}
|
|
(importDefault(14) /* metro dependency 14: TTITracker */).fetchMessages.recordStart();
|
|
defaultImport = importDefault(4900) /* metro dependency 4900: MessageCacheStats */;
|
|
recordChannelFetchStart = defaultImport.recordChannelFetchStart;
|
|
r4 = fetchKey ?? value4;
|
|
Reflect.apply(recordChannelFetchStart, defaultImport, [channelId, r4, before, after, limit]);
|
|
r4 = jump ?? value;
|
|
if (r4 == null && focus != null) {
|
|
object2 = {};
|
|
copyDataProperties(object2, focus, before);
|
|
r4 = object2;
|
|
}
|
|
(importDefault(4816) /* metro dependency 4816: ChannelMessages */).commit((importDefault(4816) /* metro dependency 4816: ChannelMessages */).getOrCreate(channelId).loadStart(r4));
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_MESSAGES'});
|
|
messageId = r4 == null ? value : r4.messageId;
|
|
binding = env0_54;
|
|
value9 = Object.create(binding.prototype, {constructor: {value: binding}});
|
|
binding2 = new binding();
|
|
if (!skipLocalFetch) {
|
|
this.fetchLocalMessages(channelId, fetchKey ?? value4, before, after, limit,
|
|
binding2 instanceof Object ? binding2 : value9);
|
|
}
|
|
get = HTTP.get;
|
|
object2 = {'url': null, 'query': null, 'retries': 2, 'oldFormErrors': true, 'rejectWithError': false};
|
|
object2.url = Endpoints.MESSAGES(channelId);
|
|
object2.query = {before: before, after: after, limit: limit, around: messageId, preload: isPreload,
|
|
feature: feature};
|
|
value = Reflect.apply(get, HTTP, [object2]);
|
|
return value.then(function(a0) {
|
|
var env0_0 = a0;
|
|
importDefault(dependencyMap[56]).fetchMessages.recordEnd();
|
|
importDefault(dependencyMap[56]).dispatchMessages.measure(_fun56180);
|
|
return true;
|
|
}, _fun56183);
|
|
}
|
|
const type = channel.type;
|
|
const GUILD_STORE = ChannelTypes.GUILD_STORE;
|
|
if (type === GUILD_STORE) {
|
|
return false;
|
|
}
|
|
if (channelId === FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID) {
|
|
return value;
|
|
}
|
|
binding = env0_51;
|
|
const log = binding.log;
|
|
const JSON = global.JSON;
|
|
Reflect.apply(log, binding,
|
|
['Fetching messages for ' + channelId + ' between ' + after + ' and ' + before + '. jump=' + JSON.stringify(jump)]);
|
|
binding = env0_56;
|
|
if (binding._tryFetchMessagesCached({channelId: channelId, before: before, after: after, limit: limit, jump: jump,
|
|
focus: focus, truncate: truncate})) {
|
|
return value;
|
|
}
|
|
(importDefault(14) /* metro dependency 14: TTITracker */).fetchMessages.recordStart();
|
|
defaultImport = importDefault(4900) /* metro dependency 4900: MessageCacheStats */;
|
|
defaultImport.recordChannelFetchStart(channelId, fetchKey ?? value4, before, after, limit);
|
|
if ((jump ?? value) == null && focus != null) {
|
|
object2 = {};
|
|
copyDataProperties(object2, focus, before);
|
|
r4 = object2;
|
|
}
|
|
(importDefault(4816) /* metro dependency 4816: ChannelMessages */).commit((importDefault(4816) /* metro dependency 4816: ChannelMessages */).getOrCreate(channelId).loadStart(r4));
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_MESSAGES'});
|
|
messageId = r4 == null ? value : r4.messageId;
|
|
binding = env0_54;
|
|
value9 = Object.create(binding.prototype, {constructor: {value: binding}});
|
|
binding2 = new binding();
|
|
if (!skipLocalFetch) {
|
|
this.fetchLocalMessages(channelId, fetchKey ?? value4, before, after, limit,
|
|
binding2 instanceof Object ? binding2 : value9);
|
|
}
|
|
get = HTTP.get;
|
|
object2 = {'url': null, 'query': null, 'retries': 2, 'oldFormErrors': true, 'rejectWithError': false};
|
|
object2.url = Endpoints.MESSAGES(channelId);
|
|
object2.query = {before: before, after: after, limit: limit, around: messageId, preload: isPreload,
|
|
feature: feature};
|
|
return Reflect.apply(get, HTTP, [object2]).then(function(a0) {
|
|
var env0_0 = a0;
|
|
importDefault(dependencyMap[56]).fetchMessages.recordEnd();
|
|
importDefault(dependencyMap[56]).dispatchMessages.measure(_fun56180);
|
|
return true;
|
|
}, _fun56183);
|
|
}
|
|
|
|
function fetchLocalMessages(a0, a1, a2, a3, a4, a5) { // fn#56184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:11554, offset: 0x013bffbb, size: 69 bytes, params: 7, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
const env0_3 = a3;
|
|
const env0_4 = a4;
|
|
return a5(_fun56186)();
|
|
}
|
|
|
|
function fetchNewLocalMessages(a0, a1) { // fn#56188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:12418, offset: 0x013c02ff, size: 41 bytes, params: 3, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
return env0_5(_fun56190)();
|
|
}
|
|
|
|
function _tryFetchMessagesCached({channelId, before, after, limit, jump, focus, truncate}) { // fn#56193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:13115, offset: 0x013c05a1, size: 923 bytes, params: 2, frame: 26
|
|
var messageId;
|
|
var r8;
|
|
var r1;
|
|
var r11;
|
|
var r10;
|
|
var r7;
|
|
var value3;
|
|
var object2;
|
|
var has;
|
|
var defaultImport;
|
|
var value9;
|
|
var value10;
|
|
var defaultImport2;
|
|
var defaultImport3;
|
|
var defaultImport4;
|
|
var defaultImport5;
|
|
var value;
|
|
const messages = MessageStore.getMessages(channelId);
|
|
if (!messages.cached) {
|
|
if (messages.ready) {
|
|
value3 = undefined;
|
|
messageId = jump == null ? value3 : jump.messageId;
|
|
if (messageId != null) {
|
|
messageId = jump == null ? value3 : jump.messageId;
|
|
if (messageId == null) {
|
|
messageId = focus == null ? value3 : focus.messageId;
|
|
if (messageId == null) {
|
|
r11 = jump;
|
|
if ((r11 == null ? value3 : r11.messageId) != null) {
|
|
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r10 = defaultImport.extractTimestamp(r11 == null ? value3 : r11.messageId);
|
|
} else {
|
|
r10 = 0;
|
|
}
|
|
value9 = messages.first();
|
|
value10 = messages.last();
|
|
r1 = !messages.hasMoreBefore && value9 != null;
|
|
if (r1) {
|
|
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r1 = defaultImport2.extractTimestamp(value9.id) >= r10;
|
|
}
|
|
if (!r1) {
|
|
r7 = !messages.hasMoreAfter && value10 != null;
|
|
if (r7) {
|
|
defaultImport3 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport3.extractTimestamp(value10.id) <= r10;
|
|
}
|
|
r1 = r7;
|
|
}
|
|
if (!r1) {
|
|
r7 = value9 != null && value10 != null;
|
|
if (r7) {
|
|
defaultImport4 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport4.extractTimestamp(value9.id) < r10;
|
|
}
|
|
if (r7) {
|
|
defaultImport5 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport5.extractTimestamp(value10.id) > r10;
|
|
}
|
|
r1 = r7;
|
|
}
|
|
if (r1) {
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_MESSAGES_SUCCESS_CACHED',
|
|
|
|
|
|
|
|
|
|
channelId: channelId, jump: r11, limit: MAX_MESSAGES_FOR_JUMP});
|
|
r1 = true;
|
|
}
|
|
return r1;
|
|
}
|
|
has = messages.has;
|
|
messageId = focus.messageId;
|
|
if (Reflect.apply(has, messages, [messageId, false])) {
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.dispatch({type: 'LOAD_MESSAGES_SUCCESS_CACHED', channelId: channelId, focus: focus,
|
|
limit: limit,
|
|
truncate: truncate});
|
|
return true;
|
|
}
|
|
object2 = {};
|
|
copyDataProperties(object2, focus, undefined);
|
|
r11 = object2;
|
|
messageId = r11 == null ? value3 : r11.messageId;
|
|
if (messageId != null) {
|
|
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r10 = defaultImport.extractTimestamp(r11 == null ? value3 : r11.messageId);
|
|
} else {
|
|
r10 = 0;
|
|
}
|
|
value9 = messages.first();
|
|
value10 = messages.last();
|
|
r1 = !messages.hasMoreBefore && value9 != null;
|
|
if (r1) {
|
|
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r1 = defaultImport2.extractTimestamp(value9.id) >= r10;
|
|
}
|
|
if (!r1) {
|
|
r7 = !messages.hasMoreAfter && value10 != null;
|
|
if (r7) {
|
|
defaultImport3 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport3.extractTimestamp(value10.id) <= r10;
|
|
}
|
|
r1 = r7;
|
|
}
|
|
if (!r1) {
|
|
r7 = value9 != null && value10 != null;
|
|
if (r7) {
|
|
defaultImport4 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport4.extractTimestamp(value9.id) < r10;
|
|
}
|
|
if (r7) {
|
|
defaultImport5 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport5.extractTimestamp(value10.id) > r10;
|
|
}
|
|
r1 = r7;
|
|
}
|
|
if (r1) {
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_MESSAGES_SUCCESS_CACHED',
|
|
|
|
|
|
|
|
channelId: channelId, jump: r11, limit: MAX_MESSAGES_FOR_JUMP});
|
|
r1 = true;
|
|
}
|
|
return r1;
|
|
}
|
|
has = messages.has;
|
|
messageId = jump.messageId;
|
|
if (Reflect.apply(has, messages, [messageId, false])) {
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.dispatch({type: 'LOAD_MESSAGES_SUCCESS_CACHED', channelId: channelId, jump: jump,
|
|
limit: limit,
|
|
truncate: truncate});
|
|
return true;
|
|
}
|
|
messageId = focus == null ? value3 : focus.messageId;
|
|
if (messageId == null) {
|
|
r11 = jump;
|
|
if ((r11 == null ? value3 : r11.messageId) != null) {
|
|
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r10 = defaultImport.extractTimestamp(r11 == null ? value3 : r11.messageId);
|
|
} else {
|
|
r10 = 0;
|
|
}
|
|
value9 = messages.first();
|
|
value10 = messages.last();
|
|
r1 = !messages.hasMoreBefore && value9 != null;
|
|
if (r1) {
|
|
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r1 = defaultImport2.extractTimestamp(value9.id) >= r10;
|
|
}
|
|
if (!r1) {
|
|
r7 = !messages.hasMoreAfter && value10 != null;
|
|
if (r7) {
|
|
defaultImport3 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport3.extractTimestamp(value10.id) <= r10;
|
|
}
|
|
r1 = r7;
|
|
}
|
|
if (!r1) {
|
|
r7 = value9 != null && value10 != null;
|
|
if (r7) {
|
|
defaultImport4 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport4.extractTimestamp(value9.id) < r10;
|
|
}
|
|
if (r7) {
|
|
defaultImport5 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport5.extractTimestamp(value10.id) > r10;
|
|
}
|
|
r1 = r7;
|
|
}
|
|
if (r1) {
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_MESSAGES_SUCCESS_CACHED',
|
|
|
|
|
|
|
|
channelId: channelId, jump: r11, limit: MAX_MESSAGES_FOR_JUMP});
|
|
r1 = true;
|
|
}
|
|
return r1;
|
|
}
|
|
has = messages.has;
|
|
messageId = focus.messageId;
|
|
if (Reflect.apply(has, messages, [messageId, false])) {
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.dispatch({type: 'LOAD_MESSAGES_SUCCESS_CACHED', channelId: channelId, focus: focus,
|
|
limit: limit,
|
|
truncate: truncate});
|
|
return true;
|
|
}
|
|
object2 = {};
|
|
copyDataProperties(object2, focus, undefined);
|
|
r11 = object2;
|
|
messageId = r11 == null ? value3 : r11.messageId;
|
|
if (messageId != null) {
|
|
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r10 = defaultImport.extractTimestamp(r11 == null ? value3 : r11.messageId);
|
|
} else {
|
|
r10 = 0;
|
|
}
|
|
value9 = messages.first();
|
|
value10 = messages.last();
|
|
r1 = !messages.hasMoreBefore && value9 != null;
|
|
if (r1) {
|
|
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r1 = defaultImport2.extractTimestamp(value9.id) >= r10;
|
|
}
|
|
if (!r1) {
|
|
r7 = !messages.hasMoreAfter && value10 != null;
|
|
if (r7) {
|
|
defaultImport3 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport3.extractTimestamp(value10.id) <= r10;
|
|
}
|
|
r1 = r7;
|
|
}
|
|
if (!r1) {
|
|
r7 = value9 != null && value10 != null;
|
|
if (r7) {
|
|
defaultImport4 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport4.extractTimestamp(value9.id) < r10;
|
|
}
|
|
if (r7) {
|
|
defaultImport5 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport5.extractTimestamp(value10.id) > r10;
|
|
}
|
|
r1 = r7;
|
|
}
|
|
if (r1) {
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_MESSAGES_SUCCESS_CACHED',
|
|
|
|
|
|
channelId: channelId, jump: r11, limit: MAX_MESSAGES_FOR_JUMP});
|
|
r1 = true;
|
|
}
|
|
return r1;
|
|
}
|
|
messageId = focus == null ? value3 : focus.messageId;
|
|
if (messageId != null) {
|
|
messageId = jump == null ? value3 : jump.messageId;
|
|
if (messageId == null) {
|
|
messageId = focus == null ? value3 : focus.messageId;
|
|
if (messageId == null) {
|
|
r11 = jump;
|
|
if ((r11 == null ? value3 : r11.messageId) != null) {
|
|
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r10 = defaultImport.extractTimestamp(r11 == null ? value3 : r11.messageId);
|
|
} else {
|
|
r10 = 0;
|
|
}
|
|
value9 = messages.first();
|
|
value10 = messages.last();
|
|
r1 = !messages.hasMoreBefore && value9 != null;
|
|
if (r1) {
|
|
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r1 = defaultImport2.extractTimestamp(value9.id) >= r10;
|
|
}
|
|
if (!r1) {
|
|
r7 = !messages.hasMoreAfter && value10 != null;
|
|
if (r7) {
|
|
defaultImport3 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport3.extractTimestamp(value10.id) <= r10;
|
|
}
|
|
r1 = r7;
|
|
}
|
|
if (!r1) {
|
|
r7 = value9 != null && value10 != null;
|
|
if (r7) {
|
|
defaultImport4 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport4.extractTimestamp(value9.id) < r10;
|
|
}
|
|
if (r7) {
|
|
defaultImport5 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport5.extractTimestamp(value10.id) > r10;
|
|
}
|
|
r1 = r7;
|
|
}
|
|
if (r1) {
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_MESSAGES_SUCCESS_CACHED',
|
|
|
|
|
|
|
|
|
|
channelId: channelId, jump: r11, limit: MAX_MESSAGES_FOR_JUMP});
|
|
r1 = true;
|
|
}
|
|
return r1;
|
|
}
|
|
has = messages.has;
|
|
messageId = focus.messageId;
|
|
if (Reflect.apply(has, messages, [messageId, false])) {
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.dispatch({type: 'LOAD_MESSAGES_SUCCESS_CACHED', channelId: channelId, focus: focus,
|
|
limit: limit,
|
|
truncate: truncate});
|
|
return true;
|
|
}
|
|
object2 = {};
|
|
copyDataProperties(object2, focus, undefined);
|
|
r11 = object2;
|
|
messageId = r11 == null ? value3 : r11.messageId;
|
|
if (messageId != null) {
|
|
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r10 = defaultImport.extractTimestamp(r11 == null ? value3 : r11.messageId);
|
|
} else {
|
|
r10 = 0;
|
|
}
|
|
value9 = messages.first();
|
|
value10 = messages.last();
|
|
r1 = !messages.hasMoreBefore && value9 != null;
|
|
if (r1) {
|
|
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r1 = defaultImport2.extractTimestamp(value9.id) >= r10;
|
|
}
|
|
if (!r1) {
|
|
r7 = !messages.hasMoreAfter && value10 != null;
|
|
if (r7) {
|
|
defaultImport3 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport3.extractTimestamp(value10.id) <= r10;
|
|
}
|
|
r1 = r7;
|
|
}
|
|
if (!r1) {
|
|
r7 = value9 != null && value10 != null;
|
|
if (r7) {
|
|
defaultImport4 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport4.extractTimestamp(value9.id) < r10;
|
|
}
|
|
if (r7) {
|
|
defaultImport5 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport5.extractTimestamp(value10.id) > r10;
|
|
}
|
|
r1 = r7;
|
|
}
|
|
if (r1) {
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_MESSAGES_SUCCESS_CACHED',
|
|
|
|
|
|
|
|
channelId: channelId, jump: r11, limit: MAX_MESSAGES_FOR_JUMP});
|
|
r1 = true;
|
|
}
|
|
return r1;
|
|
}
|
|
has = messages.has;
|
|
messageId = jump.messageId;
|
|
if (Reflect.apply(has, messages, [messageId, false])) {
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.dispatch({type: 'LOAD_MESSAGES_SUCCESS_CACHED', channelId: channelId, jump: jump,
|
|
limit: limit,
|
|
truncate: truncate});
|
|
return true;
|
|
}
|
|
messageId = focus == null ? value3 : focus.messageId;
|
|
if (messageId == null) {
|
|
r11 = jump;
|
|
if ((r11 == null ? value3 : r11.messageId) != null) {
|
|
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r10 = defaultImport.extractTimestamp(r11 == null ? value3 : r11.messageId);
|
|
} else {
|
|
r10 = 0;
|
|
}
|
|
value9 = messages.first();
|
|
value10 = messages.last();
|
|
r1 = !messages.hasMoreBefore && value9 != null;
|
|
if (r1) {
|
|
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r1 = defaultImport2.extractTimestamp(value9.id) >= r10;
|
|
}
|
|
if (!r1) {
|
|
r7 = !messages.hasMoreAfter && value10 != null;
|
|
if (r7) {
|
|
defaultImport3 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport3.extractTimestamp(value10.id) <= r10;
|
|
}
|
|
r1 = r7;
|
|
}
|
|
if (!r1) {
|
|
r7 = value9 != null && value10 != null;
|
|
if (r7) {
|
|
defaultImport4 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport4.extractTimestamp(value9.id) < r10;
|
|
}
|
|
if (r7) {
|
|
defaultImport5 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport5.extractTimestamp(value10.id) > r10;
|
|
}
|
|
r1 = r7;
|
|
}
|
|
if (r1) {
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_MESSAGES_SUCCESS_CACHED',
|
|
|
|
|
|
|
|
channelId: channelId, jump: r11, limit: MAX_MESSAGES_FOR_JUMP});
|
|
r1 = true;
|
|
}
|
|
return r1;
|
|
}
|
|
has = messages.has;
|
|
messageId = focus.messageId;
|
|
if (Reflect.apply(has, messages, [messageId, false])) {
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.dispatch({type: 'LOAD_MESSAGES_SUCCESS_CACHED', channelId: channelId, focus: focus,
|
|
limit: limit,
|
|
truncate: truncate});
|
|
return true;
|
|
}
|
|
object2 = {};
|
|
copyDataProperties(object2, focus, undefined);
|
|
r11 = object2;
|
|
messageId = r11 == null ? value3 : r11.messageId;
|
|
if (messageId != null) {
|
|
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r10 = defaultImport.extractTimestamp(r11 == null ? value3 : r11.messageId);
|
|
} else {
|
|
r10 = 0;
|
|
}
|
|
value9 = messages.first();
|
|
value10 = messages.last();
|
|
r1 = !messages.hasMoreBefore && value9 != null;
|
|
if (r1) {
|
|
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r1 = defaultImport2.extractTimestamp(value9.id) >= r10;
|
|
}
|
|
if (!r1) {
|
|
r7 = !messages.hasMoreAfter && value10 != null;
|
|
if (r7) {
|
|
defaultImport3 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport3.extractTimestamp(value10.id) <= r10;
|
|
}
|
|
r1 = r7;
|
|
}
|
|
if (!r1) {
|
|
r7 = value9 != null && value10 != null;
|
|
if (r7) {
|
|
defaultImport4 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport4.extractTimestamp(value9.id) < r10;
|
|
}
|
|
if (r7) {
|
|
defaultImport5 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r7 = defaultImport5.extractTimestamp(value10.id) > r10;
|
|
}
|
|
r1 = r7;
|
|
}
|
|
if (r1) {
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_MESSAGES_SUCCESS_CACHED',
|
|
|
|
|
|
channelId: channelId, jump: r11, limit: MAX_MESSAGES_FOR_JUMP});
|
|
r1 = true;
|
|
}
|
|
return r1;
|
|
}
|
|
if (before == null) {
|
|
r8 = after == null || !messages.hasAfterCached(after);
|
|
if (r8) {
|
|
r1 = !r8;
|
|
} else {
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.dispatch({type: 'LOAD_MESSAGES_SUCCESS_CACHED', channelId: channelId, after: after,
|
|
limit: limit,
|
|
truncate: truncate});
|
|
value = true;
|
|
r1 = value;
|
|
}
|
|
} else if (messages.hasBeforeCached(before)) {
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.dispatch({type: 'LOAD_MESSAGES_SUCCESS_CACHED', channelId: channelId, before: before,
|
|
limit: limit,
|
|
truncate: truncate});
|
|
value = true;
|
|
r1 = value;
|
|
} else {
|
|
r8 = after == null || !messages.hasAfterCached(after);
|
|
if (r8) {
|
|
r1 = !r8;
|
|
} else {
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.dispatch({type: 'LOAD_MESSAGES_SUCCESS_CACHED', channelId: channelId, after: after,
|
|
limit: limit,
|
|
truncate: truncate});
|
|
value = true;
|
|
r1 = value;
|
|
}
|
|
}
|
|
return r1;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function sendMessage(a0, a1) { // fn#56194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:14424, offset: 0x013c093c, size: 61 bytes, params: 3, frame: 12
|
|
const value = a2;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = !(value !== undefined) || value;
|
|
const env0_3 = a3;
|
|
return env0_5(_fun56196)();
|
|
}
|
|
|
|
function getSendMessageOptionsForReply(a0) { // fn#56200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:15016, offset: 0x013c0bf7, size: 156 bytes, params: 2, frame: 15
|
|
var r2;
|
|
var r0;
|
|
var object4;
|
|
var object5;
|
|
var channel;
|
|
var guildId;
|
|
var value2;
|
|
var id;
|
|
var object6;
|
|
if (a0 == null) {
|
|
r0 = {};
|
|
} else {
|
|
object4 = {};
|
|
object5 = {};
|
|
channel = a0.channel;
|
|
guildId = channel.getGuildId();
|
|
value2 = undefined;
|
|
object5.guild_id = guildId ?? value2;
|
|
channel = a0.channel;
|
|
id = channel.id;
|
|
object5.channel_id = id;
|
|
id = a0.message.id;
|
|
object5.message_id = id;
|
|
object4.messageReference = object5;
|
|
if (a0.shouldMention) {
|
|
r2 = value2;
|
|
} else {
|
|
object6 = {};
|
|
object6.parse = global.Object.values(AllowedMentionTypes);
|
|
object6.replied_user = false;
|
|
r2 = object6;
|
|
}
|
|
object4.allowedMentions = r2;
|
|
object4.mediaMention = a0.mediaMention;
|
|
r0 = object4;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function getSendMessageOptions(a0) { // fn#56204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:15625, offset: 0x013c0cf3, size: 140 bytes, params: 2, frame: 16
|
|
const object5 = {};
|
|
let binding = env0_56;
|
|
const getSendMessageOptionsForReply = binding.getSendMessageOptionsForReply;
|
|
copyDataProperties(object5, Reflect.apply(getSendMessageOptionsForReply, binding, [a0.pendingReply]), undefined);
|
|
binding = env0_56;
|
|
const getSendMessageOptionsForStickers = binding.getSendMessageOptionsForStickers;
|
|
const object6 = {};
|
|
const value2 = copyDataProperties(object6, a0, undefined);
|
|
copyDataProperties(object5, Reflect.apply(getSendMessageOptionsForStickers, binding, [object6]), value2);
|
|
binding = env0_56;
|
|
const getSendMessageOptionsForScheduledMessage = binding.getSendMessageOptionsForScheduledMessage;
|
|
const object7 = {};
|
|
const value3 = copyDataProperties(object7, a0, value2);
|
|
copyDataProperties(object5, Reflect.apply(getSendMessageOptionsForScheduledMessage, binding, [object7]), value3);
|
|
binding = env0_56;
|
|
const getSendMessageOptionsForAlsoForwardToChannel = binding.getSendMessageOptionsForAlsoForwardToChannel;
|
|
const object8 = {};
|
|
copyDataProperties(object8, a0, value3);
|
|
copyDataProperties(object5, Reflect.apply(getSendMessageOptionsForAlsoForwardToChannel, binding, [object8]), value3);
|
|
return object5;
|
|
}
|
|
|
|
function sendInvite(a0, a1, a2, a3, a4) { // fn#56205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:15845, offset: 0x013c0d7f, size: 143 bytes, params: 6, frame: 17
|
|
const value2 = (importDefault(7147) /* metro dependency 7147: getInviteURL */)(a1);
|
|
const r0 = a4 == null ? value2 : '' + a4 + '\n' + value2;
|
|
const binding = env0_56;
|
|
return binding._sendMessage(a0, {content: r0, tts: false, validNonShortcutEmojis: [], invalidEmojis: []},
|
|
{location: a2, inviteAnalyticsMetadata: a3});
|
|
}
|
|
|
|
function sendActivityBookmark(a0, a1, a2, a3) { // fn#56206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:16060, offset: 0x013c0e0e, size: 76 bytes, params: 5, frame: 15
|
|
return env0_56._sendMessage(a0, {content: a1, tts: false, validNonShortcutEmojis: [], invalidEmojis: []},
|
|
{location: a2, inviteAnalyticsMetadata: a3});
|
|
}
|
|
|
|
function sendStickers(a0, a1) { // fn#56207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:16191, offset: 0x013c0e5a, size: 158 bytes, params: 3, frame: 16
|
|
var r4;
|
|
var object2;
|
|
const value = a2;
|
|
const value2 = a4;
|
|
const r2 = value !== undefined ? value : '';
|
|
const r1 = value2 !== undefined ? value2 : false;
|
|
if (typeof r2 === 'string') {
|
|
r4 = {content: r2, invalidEmojis: [], validNonShortcutEmojis: [], tts: r1};
|
|
} else {
|
|
object2 = {};
|
|
copyDataProperties(object2, r2, undefined);
|
|
r4 = r2.tts ?? r1;
|
|
object2['tts'] = r4;
|
|
r4 = object2;
|
|
}
|
|
const binding = env0_56;
|
|
const _sendMessage = binding._sendMessage;
|
|
object2 = {};
|
|
copyDataProperties(object2, a3, undefined);
|
|
object2['stickerIds'] = a1;
|
|
return Reflect.apply(_sendMessage, binding, [a0, r4, object2]);
|
|
}
|
|
|
|
function sendGreetMessage(a0, a1) { // fn#56208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:16389, offset: 0x013c0ef8, size: 184 bytes, params: 3, frame: 20
|
|
const value = a2;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const {messageReference, allowedMentions} = value !== undefined ? value : {};
|
|
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
|
const post = HTTP.post;
|
|
const object2 = {};
|
|
object2.url = Endpoints.MESSAGES_GREET(a0);
|
|
object2.body = {sticker_ids: [a1], allowed_mentions: allowedMentions, message_reference: messageReference};
|
|
object2.oldFormErrors = true;
|
|
object2.rejectWithError = false;
|
|
const GREET = MessageSendLocation.GREET;
|
|
object2.context = {location: GREET};
|
|
return Reflect.apply(post, HTTP, [object2]).then(_fun56209, _fun56210);
|
|
}
|
|
|
|
function sendPollMessage(a0, a1) { // fn#56211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:16985, offset: 0x013c10c3, size: 111 bytes, params: 3, frame: 17
|
|
const value = a2;
|
|
const r5 = value !== undefined ? value : {};
|
|
const binding = env0_56;
|
|
const _sendMessage = binding._sendMessage;
|
|
const object = {};
|
|
copyDataProperties(object, r5, undefined);
|
|
object['poll'] = a1;
|
|
const POLL_CREATION = MessageSendLocation.POLL_CREATION;
|
|
object['location'] = POLL_CREATION;
|
|
return Reflect.apply(_sendMessage, binding, [a0, {'content': '', 'tts': false, validNonShortcutEmojis: [],
|
|
invalidEmojis: []}, object]);
|
|
}
|
|
|
|
function validateMessage(a0, a1, a2) { // fn#56212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:17118, offset: 0x013c1132, size: 213 bytes, params: 4, frame: 16
|
|
var r1;
|
|
var r2;
|
|
var value;
|
|
var defaultImport;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
if (a0.some(function(a0) {
|
|
return a0.animated;
|
|
})) {
|
|
defaultImport = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
|
|
if (defaultImport.canUseAnimatedEmojis(a1)) {
|
|
value = intl.string(t['Q87rI/']);
|
|
r1 = 'INVALID_EXTERNAL_EMOJI_BODY';
|
|
r2 = value;
|
|
} else {
|
|
value = intl.string(t['V5/GgC']);
|
|
r1 = 'INVALID_ANIMATED_EMOJI_BODY';
|
|
r2 = value;
|
|
}
|
|
} else {
|
|
value = intl.string(t['Q87rI/']);
|
|
r1 = 'INVALID_EXTERNAL_EMOJI_BODY';
|
|
r2 = value;
|
|
}
|
|
return {errorMessage: r2, errorMessageName: r1};
|
|
}
|
|
|
|
function _sendMessage(a0, a1, a2) { // fn#56214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:17423, offset: 0x013c1212, size: 48 bytes, params: 4, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
return env0_5(_fun56216)();
|
|
}
|
|
|
|
function startEditMessage(a0, a1, a2, a3) { // fn#56232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:28916, offset: 0x013c321e, size: 77 bytes, params: 5, frame: 13
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MESSAGE_START_EDIT', channelId: a0,
|
|
messageId: a1, content: a2, source: a3});
|
|
}
|
|
|
|
function startEditMessageRecord(a0, a1, a2) { // fn#56233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:29033, offset: 0x013c326b, size: 264 bytes, params: 4, frame: 20
|
|
var value2;
|
|
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
|
|
const hasFlag = flagUtilsModule.hasFlag;
|
|
const flags = a1.flags;
|
|
const IS_COMPONENTS_V2 = MessageFlags.IS_COMPONENTS_V2;
|
|
if (Reflect.apply(hasFlag, flagUtilsModule, [flags, IS_COMPONENTS_V2])) {
|
|
value2 = a1.components.filter(function({type}) {
|
|
return type === require(dependencyMap[81]).ComponentType.TEXT_DISPLAY;
|
|
});
|
|
if (value2.length > 0) {
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MESSAGE_START_EDIT',
|
|
channelId: a0,
|
|
messageId: a1.id, content: value2.map(_fun56235).join('\n'), source: a2});
|
|
return undefined;
|
|
}
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MESSAGE_START_EDIT', channelId: a0,
|
|
messageId: a1.id, content: a1.content, source: a2});
|
|
} else {
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MESSAGE_START_EDIT', channelId: a0,
|
|
messageId: a1.id, content: a1.content, source: a2});
|
|
}
|
|
}
|
|
|
|
function updateEditMessage(a0, a1, a2) { // fn#56236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:29451, offset: 0x013c33a6, size: 72 bytes, params: 4, frame: 13
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MESSAGE_UPDATE_EDIT', channelId: a0,
|
|
textValue: a1, richValue: a2});
|
|
}
|
|
|
|
function endEditMessage(a0, a1) { // fn#56237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:29561, offset: 0x013c33ee, size: 62 bytes, params: 3, frame: 13
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MESSAGE_END_EDIT', channelId: a0,
|
|
response: a1});
|
|
}
|
|
|
|
function editMessage(a0, a1, {content, components}) { // fn#56238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:29662, offset: 0x013c342c, size: 63 bytes, params: 4, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
return env0_5(_fun56240)();
|
|
}
|
|
|
|
function suppressEmbeds(a0, a1) { // fn#56242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:31185, offset: 0x013c3839, size: 41 bytes, params: 3, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
return env0_5(_fun56244)();
|
|
}
|
|
|
|
function patchMessageGuildOfficial(a0, a1, a2) { // fn#56245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:31454, offset: 0x013c3958, size: 48 bytes, params: 4, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
return env0_5(_fun56247)();
|
|
}
|
|
|
|
function patchMessageAttachments(a0, a1, a2) { // fn#56248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:31724, offset: 0x013c3a82, size: 48 bytes, params: 4, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
return env0_5(_fun56250)();
|
|
}
|
|
|
|
function deleteMessage_56251(a0, a1) { // fn#56251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:31911, offset: 0x013c3b61, size: 54 bytes, params: 3, frame: 12
|
|
const value = a2;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = value !== undefined ? value : false;
|
|
return env0_5(_fun56253)();
|
|
}
|
|
|
|
function dismissAutomatedMessage(a0) { // fn#56257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:32298, offset: 0x013c3d12, size: 124 bytes, params: 2, frame: 17
|
|
var defaultImport;
|
|
if (a0.loggingName != null) {
|
|
defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
|
defaultImport.trackWithMetadata(AnalyticEvents.AUTOMATED_MESSAGE_DISMISSED, {message_name: a0.loggingName,
|
|
message_author: a0.author.username});
|
|
}
|
|
this.deleteMessage(a0.channel_id, a0.id, true);
|
|
}
|
|
|
|
function revealMessage(a0, a1) { // fn#56258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:32508, offset: 0x013c3d8e, size: 63 bytes, params: 3, frame: 13
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MESSAGE_REVEAL', channelId: a0,
|
|
messageId: a1});
|
|
}
|
|
|
|
function crosspostMessage(a0, a1) { // fn#56259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:32612, offset: 0x013c3dcd, size: 41 bytes, params: 3, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
return env0_5(_fun56261)();
|
|
}
|
|
|
|
function RemoteFetch() { // fn#56140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:1045, offset: 0x013be95b, size: 35 bytes, params: 1, frame: 13
|
|
env1_6(this, RemoteFetch);
|
|
this.completed = false;
|
|
}
|
|
|
|
function _fun56167() { // fn#56167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:7722, offset: 0x013bf4be, size: 79 bytes, params: 1, frame: 15
|
|
const object2 = {};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
object2.message = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['mktny/']);
|
|
object2.messageName = 'BOT_GDM_EXPLICIT_CONTENT';
|
|
return object2;
|
|
}
|
|
|
|
function _fun56168() { // fn#56168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:7833, offset: 0x013bf50d, size: 79 bytes, params: 1, frame: 15
|
|
const object2 = {};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
object2.message = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i4AbAS);
|
|
object2.messageName = 'BOT_GUILD_EXPLICIT_CONTENT';
|
|
return object2;
|
|
}
|
|
|
|
function* _fun56177() { // fn#56177, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:9391, offset: 0x013bf833, size: 194 bytes, params: 1, frame: 18
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var HTTP = env2_0(env2_3[53]).HTTP;
|
|
var get = HTTP.get;
|
|
var object2 = {'url': null, 'query': null, 'retries': 2, 'oldFormErrors': true, 'rejectWithError': false};
|
|
object2.url = env2_30.MESSAGES(require);
|
|
object2.query = {limit: 1, around: importDefault};
|
|
yield Reflect.apply(get, HTTP, [object2]);
|
|
var value4 = undefined;
|
|
if (false) {
|
|
return value4;
|
|
}
|
|
if (value4.body.length > 0) {
|
|
value = env2_0(env2_3[54]);
|
|
return value.createMessageRecord(value4.body[0]);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun56179(a0) { // fn#56179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:10605, offset: 0x013bfc36, size: 85 bytes, params: 2, frame: 15
|
|
const env0_0 = a0;
|
|
(importDefault(14) /* metro dependency 14: TTITracker */).fetchMessages.recordEnd();
|
|
(importDefault(14) /* metro dependency 14: TTITracker */).dispatchMessages.measure(_fun56180);
|
|
return true;
|
|
}
|
|
|
|
function _fun56183() { // fn#56183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:11416, offset: 0x013bff56, size: 101 bytes, params: 1, frame: 14
|
|
let value = environment.__proto__;
|
|
const binding = env1_51;
|
|
const log = binding.log;
|
|
const channelIdBinding = channelId;
|
|
Reflect.apply(log, binding, ['Failed to fetch messages for ' + channelIdBinding]);
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.dispatch({type: 'LOAD_MESSAGES_FAILURE', channelId: channelIdBinding});
|
|
return false;
|
|
}
|
|
|
|
function* _fun56186() { // fn#56186, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:11572, offset: 0x013c0009, size: 700 bytes, params: 1, frame: 30
|
|
var environment;
|
|
var r6;
|
|
var addLocalMessages;
|
|
var value9;
|
|
var value10;
|
|
var log;
|
|
var messages;
|
|
var length;
|
|
var binding3;
|
|
var completed;
|
|
var value12;
|
|
var binding4;
|
|
var recordChannelFetchedLocal;
|
|
var binding5;
|
|
var dispatch;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_19;
|
|
var basicChannel = binding.getBasicChannel(require);
|
|
binding = env2_1;
|
|
var binding2 = env2_3;
|
|
var orCreate = binding(binding2[58]).getOrCreate(require);
|
|
if (binding(binding2[60]).database() == null) {
|
|
env2_1(env2_3[56]).addLocalMessages(require, -1);
|
|
} else {
|
|
if (basicChannel == null) {
|
|
env2_1(env2_3[56]).addLocalMessages(require, -1);
|
|
return undefined;
|
|
}
|
|
if (importAll != null) {
|
|
env2_1(env2_3[56]).addLocalMessages(require, -1);
|
|
return undefined;
|
|
}
|
|
if (dependencyMap == null) {
|
|
if (orCreate.ready) {
|
|
if (orCreate.cached) {
|
|
binding = env2_0;
|
|
value9 = binding(env2_3[61]);
|
|
yield value9.tryLoadAsync(_fun56187);
|
|
value10 = undefined;
|
|
if (false) {
|
|
return value10;
|
|
}
|
|
if (value10 != null) {
|
|
binding = env2_51;
|
|
log = binding.log;
|
|
messages = value10.messages;
|
|
length = messages.length;
|
|
binding3 = env1_5;
|
|
completed = binding3.completed;
|
|
Reflect.apply(log, binding,
|
|
['fetched ' + length + ' messages from local database (channel_id: ' + require + ', remote_fetch_completed: ' + completed + ')']);
|
|
binding = env2_1;
|
|
value12 = binding(env2_3[56]);
|
|
addLocalMessages = value12.addLocalMessages;
|
|
messages = value10.messages;
|
|
length = messages.length;
|
|
Reflect.apply(addLocalMessages, value12, [require, length]);
|
|
completed = binding3.completed;
|
|
if (!completed) {
|
|
messages = value10.messages;
|
|
if (messages.length > 0) {
|
|
messages = value10.messages;
|
|
r6 = messages.length >= env1_4 && value10.connectionId === env2_8.lastTimeConnectedChanged();
|
|
binding = env2_1;
|
|
binding4 = env2_3;
|
|
value = binding(binding4[57]);
|
|
recordChannelFetchedLocal = value.recordChannelFetchedLocal;
|
|
binding5 = env1_4;
|
|
messages = value10.messages;
|
|
Reflect.apply(recordChannelFetchedLocal, value, [require, importDefault, importAll,
|
|
dependencyMap,
|
|
binding5,
|
|
messages]);
|
|
value = binding(binding4[48]);
|
|
dispatch = value.dispatch;
|
|
messages = value10.messages;
|
|
Reflect.apply(dispatch, value, [{type: 'LOCAL_MESSAGES_LOADED',
|
|
guildId: basicChannel.guild_id,
|
|
channelId: require,
|
|
users: value10.users, members: value10.members, messages: messages,
|
|
stale: !r6}]);
|
|
}
|
|
}
|
|
} else {
|
|
env2_1(env2_3[56]).addLocalMessages(require, -3);
|
|
}
|
|
return undefined;
|
|
}
|
|
binding = env2_1;
|
|
value = binding(env2_3[56]);
|
|
value.addLocalMessages(require, -2);
|
|
return undefined;
|
|
}
|
|
binding = env2_0;
|
|
value9 = binding(env2_3[61]);
|
|
yield value9.tryLoadAsync(_fun56187);
|
|
value10 = undefined;
|
|
if (false) {
|
|
return value10;
|
|
}
|
|
if (value10 != null) {
|
|
binding = env2_51;
|
|
log = binding.log;
|
|
messages = value10.messages;
|
|
length = messages.length;
|
|
binding3 = env1_5;
|
|
completed = binding3.completed;
|
|
Reflect.apply(log, binding,
|
|
['fetched ' + length + ' messages from local database (channel_id: ' + require + ', remote_fetch_completed: ' + completed + ')']);
|
|
binding = env2_1;
|
|
value12 = binding(env2_3[56]);
|
|
addLocalMessages = value12.addLocalMessages;
|
|
messages = value10.messages;
|
|
length = messages.length;
|
|
Reflect.apply(addLocalMessages, value12, [require, length]);
|
|
completed = binding3.completed;
|
|
if (!completed) {
|
|
messages = value10.messages;
|
|
if (messages.length > 0) {
|
|
messages = value10.messages;
|
|
r6 = messages.length >= env1_4 && value10.connectionId === env2_8.lastTimeConnectedChanged();
|
|
binding = env2_1;
|
|
binding4 = env2_3;
|
|
value = binding(binding4[57]);
|
|
recordChannelFetchedLocal = value.recordChannelFetchedLocal;
|
|
binding5 = env1_4;
|
|
messages = value10.messages;
|
|
Reflect.apply(recordChannelFetchedLocal, value, [require, importDefault, importAll,
|
|
dependencyMap,
|
|
binding5,
|
|
messages]);
|
|
value = binding(binding4[48]);
|
|
dispatch = value.dispatch;
|
|
messages = value10.messages;
|
|
Reflect.apply(dispatch, value, [{type: 'LOCAL_MESSAGES_LOADED',
|
|
guildId: basicChannel.guild_id,
|
|
channelId: require,
|
|
users: value10.users, members: value10.members, messages: messages, stale: !r6}]);
|
|
}
|
|
}
|
|
} else {
|
|
env2_1(env2_3[56]).addLocalMessages(require, -3);
|
|
}
|
|
return undefined;
|
|
}
|
|
binding = env2_1;
|
|
value = binding(env2_3[56]);
|
|
value.addLocalMessages(require, -1);
|
|
}
|
|
}
|
|
}
|
|
|
|
function* _fun56190() { // fn#56190, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:12428, offset: 0x013c0331, size: 506 bytes, params: 1, frame: 26
|
|
var r7;
|
|
var value14;
|
|
var log;
|
|
var length;
|
|
var binding2;
|
|
var value16;
|
|
var dispatch;
|
|
var object2;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = undefined;
|
|
let binding = env2_19;
|
|
const basicChannel = binding.getBasicChannel(require);
|
|
if (env2_1(env2_3[60]).database() != null) {
|
|
if (basicChannel == null) {
|
|
return value;
|
|
}
|
|
var value8 = env2_1(env2_3[58]);
|
|
var getOrCreate = value8.getOrCreate;
|
|
if (Reflect.apply(getOrCreate, value8, [require]).hasMoreAfter) {
|
|
return value;
|
|
}
|
|
var value9 = env2_0(env2_3[61]);
|
|
yield value9.tryLoadAsync(_fun56191);
|
|
var value10 = undefined;
|
|
if (false) {
|
|
return value10;
|
|
}
|
|
if (value10 != null) {
|
|
binding = env2_1;
|
|
value14 = binding(env2_3[58]).getOrCreate(require).last();
|
|
r7 = (value14 == null ? value : value14.id) == null ? value10.messages : value10.messages.filter(_fun56192);
|
|
binding = env2_51;
|
|
log = binding.log;
|
|
length = value10.messages.length;
|
|
Reflect.apply(log, binding,
|
|
['Fetched ' + length + ' messages from the cache after foregrounding. ' + r7.length + ' are new']);
|
|
length = r7.length;
|
|
if (length !== 0) {
|
|
binding = env2_1;
|
|
binding2 = env2_3;
|
|
value16 = binding(binding2[48]);
|
|
dispatch = value16.dispatch;
|
|
object2 = {type: 'LOCAL_MESSAGES_LOADED'};
|
|
object2.guildId = basicChannel.guild_id;
|
|
object2.channelId = require;
|
|
object2.users = value10.users;
|
|
object2.members = value10.members;
|
|
object2.messages = r7;
|
|
object2.stale = true;
|
|
binding = env2_0;
|
|
object2.isForegroundCacheLoad = binding(binding2[63]).isIOSPushNotificationRawPayloadFixExperimentEnabled();
|
|
Reflect.apply(dispatch, value16, [object2]);
|
|
}
|
|
}
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function* _fun56196() { // fn#56196, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:14441, offset: 0x013c0982, size: 448 bytes, params: 1, frame: 26
|
|
var environment;
|
|
var r4;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__;
|
|
if (importDefault.reaction) {
|
|
return global.Promise.resolve();
|
|
}
|
|
let binding = env2_1;
|
|
yield binding(env2_3[64])(require);
|
|
const value5 = undefined;
|
|
if (false) {
|
|
return value5;
|
|
}
|
|
if (value5 != null) {
|
|
return env2_56.sendMessage(value5, importDefault, importAll, dependencyMap);
|
|
}
|
|
const r11 = dependencyMap.nonce ?? env2_0(env2_3[51]).createNonce();
|
|
const object2 = {};
|
|
copyDataProperties(object2, dependencyMap, undefined);
|
|
object2['nonce'] = r11;
|
|
const value9 = env2_1(env2_3[65]).backgroundify(_trySend, undefined);
|
|
env2_11.recordMessageSendAttempt(require, r11, dependencyMap);
|
|
binding = env2_23;
|
|
if (binding.isReady(require)) {
|
|
r4 = value9();
|
|
} else if (importAll) {
|
|
if (require !== env2_0(env2_3[55]).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID) {
|
|
env2_52.info('Waiting for channel ' + require + ' to be ready before sending.');
|
|
r4 = new global.Promise(_fun56198);
|
|
} else {
|
|
r4 = value9();
|
|
}
|
|
} else {
|
|
r4 = value9();
|
|
}
|
|
return r4;
|
|
}
|
|
|
|
function _fun56209(a0) { // fn#56209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:16645, offset: 0x013c0fb0, size: 131 bytes, params: 2, frame: 19
|
|
const value = environment.__proto__;
|
|
const defaultImport = importDefault(7148) /* metro dependency 7148: SentMessageIntentsHandlerAndroid */;
|
|
const donateSentMessage = defaultImport.donateSentMessage;
|
|
const content = a0.body.content;
|
|
const binding = env0_0;
|
|
Reflect.apply(donateSentMessage, defaultImport, [content, binding]);
|
|
const binding2 = env1_56;
|
|
binding2.receiveMessage(binding, a0.body);
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'STICKER_TRACK_USAGE',
|
|
stickerIds: [require]});
|
|
return a0;
|
|
}
|
|
|
|
function _fun56210(a0) { // fn#56210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:16790, offset: 0x013c1033, size: 144 bytes, params: 2, frame: 15
|
|
const value = environment.__proto__;
|
|
let binding = env1_51;
|
|
binding.log('Failed to send greeting');
|
|
if (a0.status !== 429) {
|
|
binding = env1_56;
|
|
binding.sendClydeError(env0_0, a0.body.code);
|
|
}
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MESSAGE_SEND_FAILED',
|
|
messageId: a0.body.id, channelId: env0_0});
|
|
throw a0;
|
|
}
|
|
|
|
function* _fun56216() { // fn#56216, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:17435, offset: 0x013c124b, size: 2228 bytes, params: 1, frame: 53
|
|
var environment;
|
|
var r35;
|
|
var r40;
|
|
var r36;
|
|
var r39;
|
|
var guild_id;
|
|
var r32;
|
|
var type;
|
|
var r14;
|
|
var r29;
|
|
var r30;
|
|
var r28;
|
|
var session_id;
|
|
var r292;
|
|
var r24;
|
|
var r4;
|
|
var r19;
|
|
var msg;
|
|
var value;
|
|
var value2;
|
|
var value3;
|
|
var binding;
|
|
var value4;
|
|
var value5;
|
|
var value6;
|
|
var content;
|
|
var invalidEmojis;
|
|
var validNonShortcutEmojis;
|
|
var tts;
|
|
var value7;
|
|
var activityAction;
|
|
var location;
|
|
var inviteAnalyticsMetadata;
|
|
var stickerIds;
|
|
var messageReference;
|
|
var allowedMentions;
|
|
var poll;
|
|
var sharedCustomTheme;
|
|
var contentInventoryEntry;
|
|
var attachments;
|
|
var attachmentsToUpload;
|
|
var onAttachmentUploadError;
|
|
var announcementSendOptions;
|
|
var withCheckpoint;
|
|
var mediaMention;
|
|
var flags;
|
|
var value8;
|
|
var value9;
|
|
var value10;
|
|
var property;
|
|
var property2;
|
|
var value11;
|
|
var addFlag;
|
|
var SUPPRESS_NOTIFICATIONS;
|
|
var value12;
|
|
var getChannel;
|
|
var value13;
|
|
var getGuild;
|
|
var value14;
|
|
var value15;
|
|
var canSendGuildOfficialMessages;
|
|
var value16;
|
|
var IS_GUILD_OFFICIAL;
|
|
var value17;
|
|
var value18;
|
|
var messageReference2;
|
|
var FORWARD;
|
|
var value19;
|
|
var length;
|
|
var components;
|
|
var Promise;
|
|
var resolve;
|
|
var value20;
|
|
var DEFAULT;
|
|
var REPLY;
|
|
var nonce;
|
|
var value21;
|
|
var createNonce;
|
|
var nonce2;
|
|
var value22;
|
|
var object2;
|
|
var value23;
|
|
var createPollServerDataFromCreateRequest;
|
|
var value24;
|
|
var eagerDispatch;
|
|
var value25;
|
|
var updateComboOnMessageSend;
|
|
var id;
|
|
var map;
|
|
var value26;
|
|
var filter;
|
|
var receiveMessage;
|
|
var getCurrentUser;
|
|
var value27;
|
|
var validateMessage;
|
|
var value28;
|
|
var errorMessage;
|
|
var errorMessageName;
|
|
var sendBotMessage;
|
|
var MessageDataType;
|
|
var SEND;
|
|
var SEND_ANNOUNCEMENT;
|
|
var message;
|
|
var createThread;
|
|
var threadName;
|
|
var publish;
|
|
var value29;
|
|
var activity;
|
|
var JOIN_REQUEST;
|
|
var STREAM_REQUEST;
|
|
var getSessionId;
|
|
var value30;
|
|
var object5;
|
|
var targetUserId;
|
|
var party;
|
|
var value31;
|
|
var value32;
|
|
var application_id;
|
|
var isEnabled;
|
|
var value33;
|
|
var value34;
|
|
var binding2;
|
|
var value35;
|
|
var uploadMessageAttachments;
|
|
var object6;
|
|
var doNotNotifyOnError;
|
|
var value36;
|
|
var value37;
|
|
var value38;
|
|
var value39;
|
|
var value40;
|
|
var uploader;
|
|
var value41;
|
|
var value42;
|
|
var value43;
|
|
var closure;
|
|
var value44;
|
|
var prototype;
|
|
var promise;
|
|
var error;
|
|
var file;
|
|
var code;
|
|
var reason;
|
|
var responseBody;
|
|
var value45;
|
|
var logMessageSendFailure;
|
|
var items2;
|
|
exceptionSkip127: while (true) {
|
|
exceptionLanding127: while (true) {
|
|
value = undefined;
|
|
value2 = false;
|
|
if (value2) {
|
|
return value;
|
|
}
|
|
value = undefined;
|
|
var env0_0 = value;
|
|
var env0_1 = value;
|
|
var env0_2 = value;
|
|
var env0_3 = value;
|
|
var env0_4 = value;
|
|
var env0_5 = value;
|
|
var env0_6 = value;
|
|
var env0_7 = value;
|
|
var env0_8 = value;
|
|
var env0_9 = value;
|
|
var env0_10 = value;
|
|
var env0_11 = value;
|
|
var env0_12 = value;
|
|
var env0_13 = value;
|
|
var env0_14 = value;
|
|
value3 = environment.__proto__.__proto__;
|
|
binding = env2_1;
|
|
value4 = binding(env2_3[64]);
|
|
value5 = environment.__proto__;
|
|
value6 = value4(require);
|
|
if (value6 != null) {
|
|
binding = env2_52;
|
|
binding.info('Converting channel to a private channel');
|
|
return value6.then(_fun56217);
|
|
}
|
|
content = importDefault.content;
|
|
env0_0 = content;
|
|
invalidEmojis = importDefault.invalidEmojis;
|
|
validNonShortcutEmojis = importDefault.validNonShortcutEmojis;
|
|
env0_1 = validNonShortcutEmojis;
|
|
tts = importDefault.tts;
|
|
value7 = value !== tts;
|
|
r35 = value7 && tts;
|
|
activityAction = importAll.activityAction;
|
|
location = importAll.location;
|
|
env0_2 = location;
|
|
inviteAnalyticsMetadata = importAll.inviteAnalyticsMetadata;
|
|
env0_3 = inviteAnalyticsMetadata;
|
|
stickerIds = importAll.stickerIds;
|
|
env0_4 = stickerIds;
|
|
messageReference = importAll.messageReference;
|
|
env0_5 = messageReference;
|
|
allowedMentions = importAll.allowedMentions;
|
|
poll = importAll.poll;
|
|
env0_6 = poll;
|
|
sharedCustomTheme = importAll.sharedCustomTheme;
|
|
contentInventoryEntry = importAll.contentInventoryEntry;
|
|
env0_7 = contentInventoryEntry;
|
|
attachments = importAll.attachments;
|
|
attachmentsToUpload = importAll.attachmentsToUpload;
|
|
env0_8 = attachmentsToUpload;
|
|
onAttachmentUploadError = importAll.onAttachmentUploadError;
|
|
announcementSendOptions = importAll.announcementSendOptions;
|
|
withCheckpoint = importAll.withCheckpoint;
|
|
mediaMention = importAll.mediaMention;
|
|
flags = importAll.flags;
|
|
value8 = 0;
|
|
r40 = flags ?? value8;
|
|
binding = env2_1;
|
|
value9 = binding(env2_3[69])(content);
|
|
value10 = env2_4(value9, 2);
|
|
property = value10[value8];
|
|
property2 = value10[1];
|
|
reducibleJoin6: while (true) {
|
|
if (property) {
|
|
env0_0 = property2;
|
|
binding = env2_0;
|
|
value11 = binding(env2_3[70]);
|
|
addFlag = value11.addFlag;
|
|
SUPPRESS_NOTIFICATIONS = env2_35.SUPPRESS_NOTIFICATIONS;
|
|
value12 = Reflect.apply(addFlag, value11, [r40, SUPPRESS_NOTIFICATIONS]);
|
|
r36 = property2;
|
|
r39 = value12;
|
|
break reducibleJoin6;
|
|
}
|
|
r36 = content;
|
|
r39 = r40;
|
|
break reducibleJoin6;
|
|
}
|
|
binding = env2_19;
|
|
getChannel = binding.getChannel;
|
|
value13 = Reflect.apply(getChannel, binding, [require]);
|
|
binding = env2_21;
|
|
getGuild = binding.getGuild;
|
|
reducibleJoin8: while (true) {
|
|
if (value13 == null) {
|
|
guild_id = value;
|
|
break reducibleJoin8;
|
|
}
|
|
guild_id = value13.guild_id;
|
|
break reducibleJoin8;
|
|
}
|
|
value14 = Reflect.apply(getGuild, binding, [guild_id]);
|
|
binding = env2_0;
|
|
value15 = binding(env2_3[71]);
|
|
canSendGuildOfficialMessages = value15.canSendGuildOfficialMessages;
|
|
reducibleJoin10: while (true) {
|
|
if (Reflect.apply(canSendGuildOfficialMessages, value15, [value14, value13, '_sendMessage'])) {
|
|
binding = env2_0;
|
|
value16 = binding(env2_3[70]);
|
|
addFlag = value16.addFlag;
|
|
IS_GUILD_OFFICIAL = env2_35.IS_GUILD_OFFICIAL;
|
|
value17 = Reflect.apply(addFlag, value16, [r39, IS_GUILD_OFFICIAL]);
|
|
r32 = value17;
|
|
break reducibleJoin10;
|
|
}
|
|
r32 = r39;
|
|
break reducibleJoin10;
|
|
}
|
|
value18 = false;
|
|
messageReference2 = importAll.messageReference;
|
|
reducibleJoin12: while (true) {
|
|
if (messageReference2 == null) {
|
|
type = value;
|
|
break reducibleJoin12;
|
|
}
|
|
type = messageReference2.type;
|
|
break reducibleJoin12;
|
|
}
|
|
FORWARD = env2_41.FORWARD;
|
|
value19 = type === FORWARD;
|
|
env0_9 = value19;
|
|
if (r36 !== '') {
|
|
r14 = value18;
|
|
} else {
|
|
reducibleJoin28: while (true) {
|
|
if (activityAction != null) {
|
|
r14 = value18;
|
|
break reducibleJoin28;
|
|
}
|
|
if (stickerIds != null) {
|
|
r14 = value18;
|
|
break reducibleJoin28;
|
|
}
|
|
if (poll != null) {
|
|
r14 = value18;
|
|
break reducibleJoin28;
|
|
}
|
|
if (sharedCustomTheme != null) {
|
|
r14 = value18;
|
|
break reducibleJoin28;
|
|
}
|
|
if (contentInventoryEntry != null) {
|
|
r14 = value18;
|
|
break reducibleJoin28;
|
|
}
|
|
if (value19) {
|
|
r14 = value18;
|
|
break reducibleJoin28;
|
|
}
|
|
if (attachments != null) {
|
|
length = attachments.length;
|
|
reducibleJoin21: while (true) {
|
|
if (value8 !== length) {
|
|
r14 = value18;
|
|
break reducibleJoin28;
|
|
}
|
|
break reducibleJoin21;
|
|
}
|
|
}
|
|
if (!withCheckpoint) {
|
|
components = importDefault.components;
|
|
if (components != null) {
|
|
components = importDefault.components;
|
|
length = components.length;
|
|
reducibleJoin24: while (true) {
|
|
if (value8 !== length) {
|
|
r14 = value18;
|
|
break reducibleJoin28;
|
|
}
|
|
break reducibleJoin24;
|
|
}
|
|
}
|
|
if (attachmentsToUpload != null) {
|
|
length = attachmentsToUpload.length;
|
|
reducibleJoin26: while (true) {
|
|
if (length > value8) {
|
|
value20 = true;
|
|
r14 = value20;
|
|
break reducibleJoin28;
|
|
}
|
|
break reducibleJoin26;
|
|
}
|
|
}
|
|
Promise = global.Promise;
|
|
resolve = Promise.resolve;
|
|
return Reflect.apply(resolve, Promise, []);
|
|
}
|
|
r14 = value18;
|
|
break reducibleJoin28;
|
|
}
|
|
}
|
|
if (messageReference != null) {
|
|
REPLY = env2_37.REPLY;
|
|
r39 = REPLY;
|
|
} else {
|
|
DEFAULT = env2_37.DEFAULT;
|
|
r39 = DEFAULT;
|
|
}
|
|
env0_10 = r39;
|
|
nonce = importAll.nonce;
|
|
reducibleJoin33: while (true) {
|
|
if (nonce != null) {
|
|
r29 = nonce;
|
|
break reducibleJoin33;
|
|
}
|
|
binding = env2_0;
|
|
value21 = binding(env2_3[51]);
|
|
createNonce = value21.createNonce;
|
|
nonce2 = Reflect.apply(createNonce, value21, []);
|
|
r29 = nonce2;
|
|
break reducibleJoin33;
|
|
}
|
|
env0_11 = r29;
|
|
env0_12 = r29;
|
|
binding = env2_1;
|
|
value22 = binding(env2_3[49]);
|
|
object2 = {};
|
|
object2.channelId = require;
|
|
object2.content = r36;
|
|
object2.tts = r35;
|
|
object2.type = r39;
|
|
object2.messageReference = messageReference;
|
|
object2.allowedMentions = allowedMentions;
|
|
r39 = value8 === r32 ? value : r32;
|
|
object2.flags = r39;
|
|
object2.nonce = r29;
|
|
binding = env2_0;
|
|
value23 = binding(env2_3[72]);
|
|
createPollServerDataFromCreateRequest = value23.createPollServerDataFromCreateRequest;
|
|
object2.poll = Reflect.apply(createPollServerDataFromCreateRequest, value23, [poll]);
|
|
object2.sharedCustomTheme = sharedCustomTheme;
|
|
object2.mediaMention = mediaMention;
|
|
value24 = value22(object2);
|
|
eagerDispatch = importAll.eagerDispatch;
|
|
reducibleJoin38: while (true) {
|
|
if (value18 === eagerDispatch) {
|
|
break reducibleJoin38;
|
|
}
|
|
binding = env2_0;
|
|
value25 = binding(env2_3[73]);
|
|
updateComboOnMessageSend = value25.updateComboOnMessageSend;
|
|
id = value24.id;
|
|
Reflect.apply(updateComboOnMessageSend, value25, [require, id]);
|
|
reducibleJoin37: while (true) {
|
|
if (stickerIds == null) {
|
|
break reducibleJoin37;
|
|
}
|
|
map = stickerIds.map;
|
|
value26 = Reflect.apply(map, stickerIds, [_fun56218]);
|
|
filter = value26.filter;
|
|
value24.sticker_items = Reflect.apply(filter, value26, [function(a0) {
|
|
return a0 != null;
|
|
}]);
|
|
break reducibleJoin37;
|
|
}
|
|
binding = env2_56;
|
|
receiveMessage = binding.receiveMessage;
|
|
Reflect.apply(receiveMessage, binding, [require, value24, true, importAll]);
|
|
break reducibleJoin38;
|
|
}
|
|
reducibleJoin42: while (true) {
|
|
if (env2_53) {
|
|
break reducibleJoin42;
|
|
}
|
|
if (invalidEmojis == null) {
|
|
break reducibleJoin42;
|
|
}
|
|
length = invalidEmojis.length;
|
|
if (length > value8) {
|
|
env2_53 = true;
|
|
binding = env2_27;
|
|
getCurrentUser = binding.getCurrentUser;
|
|
value27 = Reflect.apply(getCurrentUser, binding, []);
|
|
binding = env2_56;
|
|
validateMessage = binding.validateMessage;
|
|
value28 = Reflect.apply(validateMessage, binding, [invalidEmojis, value27, require]);
|
|
errorMessage = value28.errorMessage;
|
|
errorMessageName = value28.errorMessageName;
|
|
binding = env2_56;
|
|
sendBotMessage = binding.sendBotMessage;
|
|
Reflect.apply(sendBotMessage, binding, [require, errorMessage, errorMessageName]);
|
|
break reducibleJoin42;
|
|
}
|
|
break reducibleJoin42;
|
|
}
|
|
object2 = {};
|
|
if (announcementSendOptions != null) {
|
|
binding = env2_0;
|
|
MessageDataType = binding(env2_3[74]).MessageDataType;
|
|
SEND_ANNOUNCEMENT = MessageDataType.SEND_ANNOUNCEMENT;
|
|
r30 = SEND_ANNOUNCEMENT;
|
|
} else {
|
|
binding = env2_0;
|
|
MessageDataType = binding(env2_3[74]).MessageDataType;
|
|
SEND = MessageDataType.SEND;
|
|
r30 = SEND;
|
|
}
|
|
object2.type = r30;
|
|
object2.message = {channelId: require, content: r36, nonce: r29, tts: r35,
|
|
message_reference: messageReference,
|
|
allowed_mentions: allowedMentions, flags: r32, analyticsLocation: location};
|
|
env0_14 = object2;
|
|
components = importDefault.components;
|
|
reducibleJoin47: while (true) {
|
|
if (components == null) {
|
|
break reducibleJoin47;
|
|
}
|
|
message = object2.message;
|
|
components = importDefault.components;
|
|
message.components = components;
|
|
break reducibleJoin47;
|
|
}
|
|
reducibleJoin50: while (true) {
|
|
if (announcementSendOptions == null) {
|
|
break reducibleJoin50;
|
|
}
|
|
message = object2.message;
|
|
createThread = announcementSendOptions.createThread;
|
|
message.create_thread = createThread;
|
|
message = object2.message;
|
|
threadName = announcementSendOptions.threadName;
|
|
message.title = threadName;
|
|
message = object2.message;
|
|
publish = announcementSendOptions.publish;
|
|
value29 = publish != null;
|
|
r28 = value29 && publish;
|
|
message.publish = r28;
|
|
break reducibleJoin50;
|
|
}
|
|
reducibleJoin63: while (true) {
|
|
if (activityAction == null) {
|
|
break reducibleJoin63;
|
|
}
|
|
reducibleJoin53: while (true) {
|
|
if (activityAction == null) {
|
|
session_id = value;
|
|
break reducibleJoin53;
|
|
}
|
|
activity = activityAction.activity;
|
|
session_id = activity.session_id;
|
|
break reducibleJoin53;
|
|
}
|
|
type = activityAction.type;
|
|
JOIN_REQUEST = env2_45.JOIN_REQUEST;
|
|
reducibleJoin57: while (true) {
|
|
if (type === JOIN_REQUEST) {
|
|
r292 = session_id;
|
|
break reducibleJoin57;
|
|
}
|
|
type = activityAction.type;
|
|
STREAM_REQUEST = env2_45.STREAM_REQUEST;
|
|
if (type === STREAM_REQUEST) {
|
|
r292 = session_id;
|
|
break reducibleJoin57;
|
|
}
|
|
if (session_id != null) {
|
|
r292 = session_id;
|
|
break reducibleJoin57;
|
|
}
|
|
binding = env2_18;
|
|
getSessionId = binding.getSessionId;
|
|
value30 = Reflect.apply(getSessionId, binding, []);
|
|
r292 = value30;
|
|
break reducibleJoin57;
|
|
}
|
|
if (r292 == null) {
|
|
break reducibleJoin63;
|
|
}
|
|
object5 = {};
|
|
type = activityAction.type;
|
|
object5.type = type;
|
|
object5.session_id = r292;
|
|
targetUserId = activityAction.targetUserId;
|
|
object5.target_user_id = targetUserId;
|
|
activity = activityAction.activity;
|
|
party = activity.party;
|
|
value31 = party != null;
|
|
reducibleJoin60: while (true) {
|
|
if (value31) {
|
|
party = activity.party;
|
|
id = party.id;
|
|
value32 = id != null;
|
|
r24 = value32;
|
|
break reducibleJoin60;
|
|
}
|
|
r24 = value31;
|
|
break reducibleJoin60;
|
|
}
|
|
reducibleJoin62: while (true) {
|
|
if (r24) {
|
|
party = activity.party;
|
|
id = party.id;
|
|
object5.party_id = id;
|
|
break reducibleJoin62;
|
|
}
|
|
break reducibleJoin62;
|
|
}
|
|
message = object2.message;
|
|
application_id = activity.application_id;
|
|
message.application_id = application_id;
|
|
message = object2.message;
|
|
message.activity = object5;
|
|
break reducibleJoin63;
|
|
}
|
|
reducibleJoin65: while (true) {
|
|
if (poll == null) {
|
|
break reducibleJoin65;
|
|
}
|
|
message = object2.message;
|
|
message.poll = poll;
|
|
break reducibleJoin65;
|
|
}
|
|
reducibleJoin67: while (true) {
|
|
if (sharedCustomTheme == null) {
|
|
break reducibleJoin67;
|
|
}
|
|
message = object2.message;
|
|
message.shared_client_theme = sharedCustomTheme;
|
|
break reducibleJoin67;
|
|
}
|
|
reducibleJoin69: while (true) {
|
|
if (stickerIds == null) {
|
|
break reducibleJoin69;
|
|
}
|
|
message = object2.message;
|
|
message.sticker_ids = stickerIds;
|
|
break reducibleJoin69;
|
|
}
|
|
binding = env2_12;
|
|
isEnabled = binding.isEnabled;
|
|
reducibleJoin71: while (true) {
|
|
if (Reflect.apply(isEnabled, binding, [])) {
|
|
message = object2.message;
|
|
message.has_poggermode_enabled = true;
|
|
break reducibleJoin71;
|
|
}
|
|
break reducibleJoin71;
|
|
}
|
|
reducibleJoin73: while (true) {
|
|
if (withCheckpoint) {
|
|
message = object2.message;
|
|
message.with_checkpoint = true;
|
|
break reducibleJoin73;
|
|
}
|
|
break reducibleJoin73;
|
|
}
|
|
reducibleJoin75: while (true) {
|
|
if (contentInventoryEntry == null) {
|
|
break reducibleJoin75;
|
|
}
|
|
message = object2.message;
|
|
message.content_inventory_entry = contentInventoryEntry;
|
|
break reducibleJoin75;
|
|
}
|
|
reducibleJoin77: while (true) {
|
|
if (mediaMention == null) {
|
|
break reducibleJoin77;
|
|
}
|
|
message = object2.message;
|
|
message.media_mention = mediaMention;
|
|
break reducibleJoin77;
|
|
}
|
|
value33 = attachments != null;
|
|
reducibleJoin79: while (true) {
|
|
if (value33) {
|
|
length = attachments.length;
|
|
value34 = length > value8;
|
|
r4 = value34;
|
|
break reducibleJoin79;
|
|
}
|
|
r4 = value33;
|
|
break reducibleJoin79;
|
|
}
|
|
reducibleJoin81: while (true) {
|
|
if (r4) {
|
|
message = object2.message;
|
|
message.attachments = attachments;
|
|
break reducibleJoin81;
|
|
}
|
|
break reducibleJoin81;
|
|
}
|
|
if (attachmentsToUpload != null) {
|
|
length = attachmentsToUpload.length;
|
|
reducibleJoin123: while (true) {
|
|
if (length > value8) {
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
binding2 = env2_3;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
property = binding2[75];
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
value35 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
uploadMessageAttachments = value35.uploadMessageAttachments;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
object6 = {};
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
object6.channelId = require;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
object6.nonce = r29;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
object6.items = attachmentsToUpload;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
object6.message = value24;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
doNotNotifyOnError = importAll.doNotNotifyOnError;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
value36 = !doNotNotifyOnError;
|
|
reducibleJoin99: while (true) {
|
|
if (doNotNotifyOnError) {
|
|
r19 = value36;
|
|
break reducibleJoin99;
|
|
}
|
|
r19 = value;
|
|
break reducibleJoin99;
|
|
}
|
|
try {
|
|
object6.shouldUploadFailureSendNotification = r19;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
value37 = Reflect.apply(uploadMessageAttachments, value35, [object6]);
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
yield value37;
|
|
try {
|
|
value38 = undefined;
|
|
value39 = false;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
if (value39) {
|
|
return value38;
|
|
}
|
|
try {
|
|
value40 = value38 == null;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
if (value40) {
|
|
return value;
|
|
}
|
|
try {
|
|
attachments = value38.attachments;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
uploader = value38.uploader;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
env0_13 = uploader;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
if (r14) {
|
|
try {
|
|
value41 = attachments == null;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
reducibleJoin115: while (true) {
|
|
reducibleJoin124: while (true) {
|
|
if (value41) {
|
|
break reducibleJoin124;
|
|
}
|
|
try {
|
|
length = attachments.length;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
value42 = value8 === length;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
if (value42) {
|
|
break reducibleJoin124;
|
|
}
|
|
break reducibleJoin115;
|
|
}
|
|
return value;
|
|
}
|
|
}
|
|
try {
|
|
value43 = attachments == null;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
if (value43) {
|
|
break reducibleJoin123;
|
|
}
|
|
try {
|
|
message = object2.message;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
map = attachments.map;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
closure = _fun56220;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
value44 = Reflect.apply(map, attachments, [closure]);
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
try {
|
|
message.attachments = value44;
|
|
} catch (error) {
|
|
break exceptionLanding127;
|
|
}
|
|
break reducibleJoin123;
|
|
}
|
|
break reducibleJoin123;
|
|
}
|
|
}
|
|
Promise = global.Promise;
|
|
prototype = Promise.prototype;
|
|
value = Object.create(prototype, {constructor: {value: Promise}});
|
|
closure = _fun56221;
|
|
promise = new Promise();
|
|
return promise instanceof Object ? promise : value;
|
|
break exceptionSkip127;
|
|
}
|
|
file = error.file;
|
|
code = error.code;
|
|
reason = error.reason;
|
|
responseBody = error.responseBody;
|
|
binding = env2_0;
|
|
value45 = binding(env2_3[76]);
|
|
logMessageSendFailure = value45.logMessageSendFailure;
|
|
object2 = {};
|
|
items2 = file.items;
|
|
object2.fileItems = items2;
|
|
object2.failureCode = code;
|
|
if (reason == null) {
|
|
object2.errorMessage = value;
|
|
Reflect.apply(logMessageSendFailure, value45, [object2]);
|
|
if (onAttachmentUploadError == null) {
|
|
return value;
|
|
}
|
|
onAttachmentUploadError(file, code, reason, responseBody);
|
|
return value;
|
|
}
|
|
msg = reason.msg;
|
|
object2.errorMessage = msg;
|
|
Reflect.apply(logMessageSendFailure, value45, [object2]);
|
|
if (onAttachmentUploadError == null) {
|
|
return value;
|
|
}
|
|
onAttachmentUploadError(file, code, reason, responseBody);
|
|
return value;
|
|
break exceptionSkip127;
|
|
}
|
|
}
|
|
|
|
function* _fun56240() { // fn#56240, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:29697, offset: 0x013c3474, size: 548 bytes, params: 1, frame: 23
|
|
var r5;
|
|
var channel;
|
|
var value7;
|
|
var object2;
|
|
var value12;
|
|
var mentions;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = undefined;
|
|
let binding = env2_20;
|
|
if (binding.getEditActionSource(require) === 'message_swipe') {
|
|
binding = env2_19;
|
|
channel = binding.getChannel(require);
|
|
binding = env2_1;
|
|
value7 = binding(env2_3[43]);
|
|
value7.track(env2_29.MESSAGE_SWIPE_ACTION_SENT, {message_id: importDefault, channel_id: require,
|
|
guild_id: channel == null ? value : channel.guild_id, swipe_action: 'edit', is_own_message: true});
|
|
}
|
|
const value8 = env2_1(env2_3[82]);
|
|
yield value8.unarchiveThreadIfNecessary(require);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
const message = env2_23.getMessage(require, importDefault);
|
|
if (message != null) {
|
|
if (message.type !== env2_37.REPLY) {
|
|
r5 = value;
|
|
} else {
|
|
binding = env2_14;
|
|
value12 = binding.getMessageByReference(message.messageReference);
|
|
if (value12.state !== env2_15.LOADED) {
|
|
r5 = value;
|
|
} else {
|
|
mentions = message.mentions;
|
|
if (mentions.includes(value12.message.author.id)) {
|
|
r5 = value;
|
|
} else {
|
|
object2 = {};
|
|
object2.parse = global.Object.values(env2_38);
|
|
object2.replied_user = false;
|
|
r5 = object2;
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
const message2 = env2_23.getMessage(require, importDefault);
|
|
const r6 = message2 != null && message2.hasFlag(env2_35.CROSSPOSTED);
|
|
object2 = {channelId: require, messageId: importDefault};
|
|
object2.content = importAll;
|
|
object2.isCrossposted = r6;
|
|
object2.allowed_mentions = r5;
|
|
object2.components = dependencyMap;
|
|
binding = env2_1;
|
|
const binding2 = env2_3;
|
|
const value15 = binding(binding2[74]);
|
|
const enqueue = value15.enqueue;
|
|
const MessageDataType = env2_0(binding2[74]).MessageDataType;
|
|
const EDIT = MessageDataType.EDIT;
|
|
Reflect.apply(enqueue, value15, [{type: EDIT, message: object2}, _fun56241]);
|
|
return value;
|
|
}
|
|
|
|
function* _fun56244() { // fn#56244, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:31195, offset: 0x013c386b, size: 237 bytes, params: 1, frame: 24
|
|
var binding2;
|
|
var HTTP;
|
|
var patch;
|
|
var object2;
|
|
var value8;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_1;
|
|
var value3 = binding(env2_3[82]);
|
|
yield value3.unarchiveThreadIfNecessary(require);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
var message = env2_23.getMessage(require, importDefault);
|
|
if (message != null) {
|
|
binding = env2_0;
|
|
binding2 = env2_3;
|
|
HTTP = binding(binding2[53]).HTTP;
|
|
patch = HTTP.patch;
|
|
object2 = {};
|
|
object2.url = env2_30.MESSAGE(require, importDefault);
|
|
value8 = binding(binding2[70]);
|
|
object2.body = {flags: value8.setFlag(message.flags, env2_35.SUPPRESS_EMBEDS, true)};
|
|
object2.oldFormErrors = true;
|
|
object2.rejectWithError = false;
|
|
Reflect.apply(patch, HTTP, [object2]);
|
|
}
|
|
}
|
|
}
|
|
|
|
function* _fun56247() { // fn#56247, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:31466, offset: 0x013c3991, size: 241 bytes, params: 1, frame: 25
|
|
var binding2;
|
|
var HTTP;
|
|
var patch;
|
|
var object2;
|
|
var value8;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_1;
|
|
var value3 = binding(env2_3[82]);
|
|
yield value3.unarchiveThreadIfNecessary(require);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
var message = env2_23.getMessage(require, importDefault);
|
|
if (message != null) {
|
|
binding = env2_0;
|
|
binding2 = env2_3;
|
|
HTTP = binding(binding2[53]).HTTP;
|
|
patch = HTTP.patch;
|
|
object2 = {};
|
|
object2.url = env2_30.MESSAGE(require, importDefault);
|
|
value8 = binding(binding2[70]);
|
|
object2.body = {flags: value8.setFlag(message.flags, env2_35.IS_GUILD_OFFICIAL, importAll)};
|
|
object2.oldFormErrors = true;
|
|
object2.rejectWithError = false;
|
|
Reflect.apply(patch, HTTP, [object2]);
|
|
}
|
|
}
|
|
}
|
|
|
|
function* _fun56250() { // fn#56250, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:31736, offset: 0x013c3abb, size: 166 bytes, params: 1, frame: 20
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var value3 = env2_1(env2_3[82]);
|
|
yield value3.unarchiveThreadIfNecessary(require);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
var HTTP = env2_0(env2_3[53]).HTTP;
|
|
var patch = HTTP.patch;
|
|
var object2 = {};
|
|
object2.url = env2_30.MESSAGE(require, importDefault);
|
|
object2.body = {attachments: importAll};
|
|
object2.oldFormErrors = true;
|
|
object2.rejectWithError = false;
|
|
Reflect.apply(patch, HTTP, [object2]);
|
|
}
|
|
}
|
|
|
|
function* _fun56253() { // fn#56253, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:31926, offset: 0x013c3ba0, size: 194 bytes, params: 1, frame: 20
|
|
var environment;
|
|
if (true) {
|
|
var closure = dispatchDelete;
|
|
value = environment.__proto__;
|
|
if (importAll) {
|
|
closure();
|
|
} else {
|
|
var binding = env2_1;
|
|
var value4 = binding(env2_3[82]);
|
|
yield value4.unarchiveThreadIfNecessary(require);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
binding = env2_0;
|
|
var HTTP = binding(env2_3[53]).HTTP;
|
|
var del = HTTP.del;
|
|
var object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': false};
|
|
binding = env2_30;
|
|
object2.url = binding.MESSAGE(require, importDefault);
|
|
Reflect.apply(del, HTTP, [object2]).then(function() {
|
|
dispatchDelete();
|
|
});
|
|
}
|
|
}
|
|
}
|
|
|
|
function* _fun56261() { // fn#56261, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:32622, offset: 0x013c3dff, size: 459 bytes, params: 1, frame: 21
|
|
var r6;
|
|
var binding;
|
|
var binding2;
|
|
var property;
|
|
var value3;
|
|
var HTTP;
|
|
var post;
|
|
var object2;
|
|
var MESSAGE_CROSSPOST;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var error;
|
|
var status;
|
|
var binding3;
|
|
var intl;
|
|
var string;
|
|
var t;
|
|
var z2gyNF;
|
|
var value9;
|
|
var binding4;
|
|
var formatToPlainString;
|
|
var Math;
|
|
var floor;
|
|
var body;
|
|
var retry_after;
|
|
var value10;
|
|
var binding5;
|
|
var value11;
|
|
var show;
|
|
var Vd1hs6;
|
|
var BddRzS;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
status = error.status;
|
|
if (status === 429) {
|
|
binding = env2_0;
|
|
binding4 = env2_3;
|
|
intl = binding(binding4[45]).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = binding(binding4[45]).t['77cuqz'];
|
|
Math = global.Math;
|
|
floor = Math.floor;
|
|
body = error.body;
|
|
retry_after = body.retry_after;
|
|
value10 = Reflect.apply(formatToPlainString, intl, [property, {retryAfter: Reflect.apply(floor, Math,
|
|
[retry_after / 60])}]);
|
|
r6 = value10;
|
|
} else {
|
|
binding = env2_0;
|
|
binding3 = env2_3;
|
|
intl = binding(binding3[45]).intl;
|
|
string = intl.string;
|
|
z2gyNF = binding(binding3[45]).t.z2gyNF;
|
|
value9 = Reflect.apply(string, intl, [z2gyNF]);
|
|
r6 = value9;
|
|
}
|
|
binding = env2_1;
|
|
binding5 = env2_3;
|
|
value11 = binding(binding5[84]);
|
|
show = value11.show;
|
|
object2 = {};
|
|
binding = env2_0;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
Vd1hs6 = t.Vd1hs6;
|
|
object2.title = Reflect.apply(string, intl, [Vd1hs6]);
|
|
object2.body = r6;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
BddRzS = t.BddRzS;
|
|
object2.confirmText = Reflect.apply(string, intl, [BddRzS]);
|
|
Reflect.apply(show, value11, [object2]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding2 = env2_3;
|
|
} catch (error) {
|
|
status = error.status;
|
|
if (status === 429) {
|
|
binding = env2_0;
|
|
binding4 = env2_3;
|
|
intl = binding(binding4[45]).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = binding(binding4[45]).t['77cuqz'];
|
|
Math = global.Math;
|
|
floor = Math.floor;
|
|
body = error.body;
|
|
retry_after = body.retry_after;
|
|
value10 = Reflect.apply(formatToPlainString, intl, [property, {retryAfter: Reflect.apply(floor, Math,
|
|
[retry_after / 60])}]);
|
|
r6 = value10;
|
|
} else {
|
|
binding = env2_0;
|
|
binding3 = env2_3;
|
|
intl = binding(binding3[45]).intl;
|
|
string = intl.string;
|
|
z2gyNF = binding(binding3[45]).t.z2gyNF;
|
|
value9 = Reflect.apply(string, intl, [z2gyNF]);
|
|
r6 = value9;
|
|
}
|
|
binding = env2_1;
|
|
binding5 = env2_3;
|
|
value11 = binding(binding5[84]);
|
|
show = value11.show;
|
|
object2 = {};
|
|
binding = env2_0;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
Vd1hs6 = t.Vd1hs6;
|
|
object2.title = Reflect.apply(string, intl, [Vd1hs6]);
|
|
object2.body = r6;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
BddRzS = t.BddRzS;
|
|
object2.confirmText = Reflect.apply(string, intl, [BddRzS]);
|
|
Reflect.apply(show, value11, [object2]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
property = binding2[53];
|
|
} catch (error) {
|
|
status = error.status;
|
|
if (status === 429) {
|
|
binding = env2_0;
|
|
binding4 = env2_3;
|
|
intl = binding(binding4[45]).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = binding(binding4[45]).t['77cuqz'];
|
|
Math = global.Math;
|
|
floor = Math.floor;
|
|
body = error.body;
|
|
retry_after = body.retry_after;
|
|
value10 = Reflect.apply(formatToPlainString, intl, [property, {retryAfter: Reflect.apply(floor, Math,
|
|
[retry_after / 60])}]);
|
|
r6 = value10;
|
|
} else {
|
|
binding = env2_0;
|
|
binding3 = env2_3;
|
|
intl = binding(binding3[45]).intl;
|
|
string = intl.string;
|
|
z2gyNF = binding(binding3[45]).t.z2gyNF;
|
|
value9 = Reflect.apply(string, intl, [z2gyNF]);
|
|
r6 = value9;
|
|
}
|
|
binding = env2_1;
|
|
binding5 = env2_3;
|
|
value11 = binding(binding5[84]);
|
|
show = value11.show;
|
|
object2 = {};
|
|
binding = env2_0;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
Vd1hs6 = t.Vd1hs6;
|
|
object2.title = Reflect.apply(string, intl, [Vd1hs6]);
|
|
object2.body = r6;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
BddRzS = t.BddRzS;
|
|
object2.confirmText = Reflect.apply(string, intl, [BddRzS]);
|
|
Reflect.apply(show, value11, [object2]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
value3 = binding(property);
|
|
} catch (error) {
|
|
status = error.status;
|
|
if (status === 429) {
|
|
binding = env2_0;
|
|
binding4 = env2_3;
|
|
intl = binding(binding4[45]).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = binding(binding4[45]).t['77cuqz'];
|
|
Math = global.Math;
|
|
floor = Math.floor;
|
|
body = error.body;
|
|
retry_after = body.retry_after;
|
|
value10 = Reflect.apply(formatToPlainString, intl, [property, {retryAfter: Reflect.apply(floor, Math,
|
|
[retry_after / 60])}]);
|
|
r6 = value10;
|
|
} else {
|
|
binding = env2_0;
|
|
binding3 = env2_3;
|
|
intl = binding(binding3[45]).intl;
|
|
string = intl.string;
|
|
z2gyNF = binding(binding3[45]).t.z2gyNF;
|
|
value9 = Reflect.apply(string, intl, [z2gyNF]);
|
|
r6 = value9;
|
|
}
|
|
binding = env2_1;
|
|
binding5 = env2_3;
|
|
value11 = binding(binding5[84]);
|
|
show = value11.show;
|
|
object2 = {};
|
|
binding = env2_0;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
Vd1hs6 = t.Vd1hs6;
|
|
object2.title = Reflect.apply(string, intl, [Vd1hs6]);
|
|
object2.body = r6;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
BddRzS = t.BddRzS;
|
|
object2.confirmText = Reflect.apply(string, intl, [BddRzS]);
|
|
Reflect.apply(show, value11, [object2]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
HTTP = value3.HTTP;
|
|
} catch (error) {
|
|
status = error.status;
|
|
if (status === 429) {
|
|
binding = env2_0;
|
|
binding4 = env2_3;
|
|
intl = binding(binding4[45]).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = binding(binding4[45]).t['77cuqz'];
|
|
Math = global.Math;
|
|
floor = Math.floor;
|
|
body = error.body;
|
|
retry_after = body.retry_after;
|
|
value10 = Reflect.apply(formatToPlainString, intl, [property, {retryAfter: Reflect.apply(floor, Math,
|
|
[retry_after / 60])}]);
|
|
r6 = value10;
|
|
} else {
|
|
binding = env2_0;
|
|
binding3 = env2_3;
|
|
intl = binding(binding3[45]).intl;
|
|
string = intl.string;
|
|
z2gyNF = binding(binding3[45]).t.z2gyNF;
|
|
value9 = Reflect.apply(string, intl, [z2gyNF]);
|
|
r6 = value9;
|
|
}
|
|
binding = env2_1;
|
|
binding5 = env2_3;
|
|
value11 = binding(binding5[84]);
|
|
show = value11.show;
|
|
object2 = {};
|
|
binding = env2_0;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
Vd1hs6 = t.Vd1hs6;
|
|
object2.title = Reflect.apply(string, intl, [Vd1hs6]);
|
|
object2.body = r6;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
BddRzS = t.BddRzS;
|
|
object2.confirmText = Reflect.apply(string, intl, [BddRzS]);
|
|
Reflect.apply(show, value11, [object2]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
post = HTTP.post;
|
|
} catch (error) {
|
|
status = error.status;
|
|
if (status === 429) {
|
|
binding = env2_0;
|
|
binding4 = env2_3;
|
|
intl = binding(binding4[45]).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = binding(binding4[45]).t['77cuqz'];
|
|
Math = global.Math;
|
|
floor = Math.floor;
|
|
body = error.body;
|
|
retry_after = body.retry_after;
|
|
value10 = Reflect.apply(formatToPlainString, intl, [property, {retryAfter: Reflect.apply(floor, Math,
|
|
[retry_after / 60])}]);
|
|
r6 = value10;
|
|
} else {
|
|
binding = env2_0;
|
|
binding3 = env2_3;
|
|
intl = binding(binding3[45]).intl;
|
|
string = intl.string;
|
|
z2gyNF = binding(binding3[45]).t.z2gyNF;
|
|
value9 = Reflect.apply(string, intl, [z2gyNF]);
|
|
r6 = value9;
|
|
}
|
|
binding = env2_1;
|
|
binding5 = env2_3;
|
|
value11 = binding(binding5[84]);
|
|
show = value11.show;
|
|
object2 = {};
|
|
binding = env2_0;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
Vd1hs6 = t.Vd1hs6;
|
|
object2.title = Reflect.apply(string, intl, [Vd1hs6]);
|
|
object2.body = r6;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
BddRzS = t.BddRzS;
|
|
object2.confirmText = Reflect.apply(string, intl, [BddRzS]);
|
|
Reflect.apply(show, value11, [object2]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
object2 = {'url': null, 'oldFormErrors': true, 'failImmediatelyWhenRateLimited': true,
|
|
'rejectWithError': false};
|
|
} catch (error) {
|
|
status = error.status;
|
|
if (status === 429) {
|
|
binding = env2_0;
|
|
binding4 = env2_3;
|
|
intl = binding(binding4[45]).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = binding(binding4[45]).t['77cuqz'];
|
|
Math = global.Math;
|
|
floor = Math.floor;
|
|
body = error.body;
|
|
retry_after = body.retry_after;
|
|
value10 = Reflect.apply(formatToPlainString, intl, [property, {retryAfter: Reflect.apply(floor, Math,
|
|
[retry_after / 60])}]);
|
|
r6 = value10;
|
|
} else {
|
|
binding = env2_0;
|
|
binding3 = env2_3;
|
|
intl = binding(binding3[45]).intl;
|
|
string = intl.string;
|
|
z2gyNF = binding(binding3[45]).t.z2gyNF;
|
|
value9 = Reflect.apply(string, intl, [z2gyNF]);
|
|
r6 = value9;
|
|
}
|
|
binding = env2_1;
|
|
binding5 = env2_3;
|
|
value11 = binding(binding5[84]);
|
|
show = value11.show;
|
|
object2 = {};
|
|
binding = env2_0;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
Vd1hs6 = t.Vd1hs6;
|
|
object2.title = Reflect.apply(string, intl, [Vd1hs6]);
|
|
object2.body = r6;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
BddRzS = t.BddRzS;
|
|
object2.confirmText = Reflect.apply(string, intl, [BddRzS]);
|
|
Reflect.apply(show, value11, [object2]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding = env2_30;
|
|
} catch (error) {
|
|
status = error.status;
|
|
if (status === 429) {
|
|
binding = env2_0;
|
|
binding4 = env2_3;
|
|
intl = binding(binding4[45]).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = binding(binding4[45]).t['77cuqz'];
|
|
Math = global.Math;
|
|
floor = Math.floor;
|
|
body = error.body;
|
|
retry_after = body.retry_after;
|
|
value10 = Reflect.apply(formatToPlainString, intl, [property, {retryAfter: Reflect.apply(floor, Math,
|
|
[retry_after / 60])}]);
|
|
r6 = value10;
|
|
} else {
|
|
binding = env2_0;
|
|
binding3 = env2_3;
|
|
intl = binding(binding3[45]).intl;
|
|
string = intl.string;
|
|
z2gyNF = binding(binding3[45]).t.z2gyNF;
|
|
value9 = Reflect.apply(string, intl, [z2gyNF]);
|
|
r6 = value9;
|
|
}
|
|
binding = env2_1;
|
|
binding5 = env2_3;
|
|
value11 = binding(binding5[84]);
|
|
show = value11.show;
|
|
object2 = {};
|
|
binding = env2_0;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
Vd1hs6 = t.Vd1hs6;
|
|
object2.title = Reflect.apply(string, intl, [Vd1hs6]);
|
|
object2.body = r6;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
BddRzS = t.BddRzS;
|
|
object2.confirmText = Reflect.apply(string, intl, [BddRzS]);
|
|
Reflect.apply(show, value11, [object2]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
MESSAGE_CROSSPOST = binding.MESSAGE_CROSSPOST;
|
|
} catch (error) {
|
|
status = error.status;
|
|
if (status === 429) {
|
|
binding = env2_0;
|
|
binding4 = env2_3;
|
|
intl = binding(binding4[45]).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = binding(binding4[45]).t['77cuqz'];
|
|
Math = global.Math;
|
|
floor = Math.floor;
|
|
body = error.body;
|
|
retry_after = body.retry_after;
|
|
value10 = Reflect.apply(formatToPlainString, intl, [property, {retryAfter: Reflect.apply(floor, Math,
|
|
[retry_after / 60])}]);
|
|
r6 = value10;
|
|
} else {
|
|
binding = env2_0;
|
|
binding3 = env2_3;
|
|
intl = binding(binding3[45]).intl;
|
|
string = intl.string;
|
|
z2gyNF = binding(binding3[45]).t.z2gyNF;
|
|
value9 = Reflect.apply(string, intl, [z2gyNF]);
|
|
r6 = value9;
|
|
}
|
|
binding = env2_1;
|
|
binding5 = env2_3;
|
|
value11 = binding(binding5[84]);
|
|
show = value11.show;
|
|
object2 = {};
|
|
binding = env2_0;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
Vd1hs6 = t.Vd1hs6;
|
|
object2.title = Reflect.apply(string, intl, [Vd1hs6]);
|
|
object2.body = r6;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
BddRzS = t.BddRzS;
|
|
object2.confirmText = Reflect.apply(string, intl, [BddRzS]);
|
|
Reflect.apply(show, value11, [object2]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
status = error.status;
|
|
if (status === 429) {
|
|
binding = env2_0;
|
|
binding4 = env2_3;
|
|
intl = binding(binding4[45]).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = binding(binding4[45]).t['77cuqz'];
|
|
Math = global.Math;
|
|
floor = Math.floor;
|
|
body = error.body;
|
|
retry_after = body.retry_after;
|
|
value10 = Reflect.apply(formatToPlainString, intl, [property, {retryAfter: Reflect.apply(floor, Math,
|
|
[retry_after / 60])}]);
|
|
r6 = value10;
|
|
} else {
|
|
binding = env2_0;
|
|
binding3 = env2_3;
|
|
intl = binding(binding3[45]).intl;
|
|
string = intl.string;
|
|
z2gyNF = binding(binding3[45]).t.z2gyNF;
|
|
value9 = Reflect.apply(string, intl, [z2gyNF]);
|
|
r6 = value9;
|
|
}
|
|
binding = env2_1;
|
|
binding5 = env2_3;
|
|
value11 = binding(binding5[84]);
|
|
show = value11.show;
|
|
object2 = {};
|
|
binding = env2_0;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
Vd1hs6 = t.Vd1hs6;
|
|
object2.title = Reflect.apply(string, intl, [Vd1hs6]);
|
|
object2.body = r6;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
BddRzS = t.BddRzS;
|
|
object2.confirmText = Reflect.apply(string, intl, [BddRzS]);
|
|
Reflect.apply(show, value11, [object2]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
status = error.status;
|
|
if (status === 429) {
|
|
binding = env2_0;
|
|
binding4 = env2_3;
|
|
intl = binding(binding4[45]).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = binding(binding4[45]).t['77cuqz'];
|
|
Math = global.Math;
|
|
floor = Math.floor;
|
|
body = error.body;
|
|
retry_after = body.retry_after;
|
|
value10 = Reflect.apply(formatToPlainString, intl, [property, {retryAfter: Reflect.apply(floor, Math,
|
|
[retry_after / 60])}]);
|
|
r6 = value10;
|
|
} else {
|
|
binding = env2_0;
|
|
binding3 = env2_3;
|
|
intl = binding(binding3[45]).intl;
|
|
string = intl.string;
|
|
z2gyNF = binding(binding3[45]).t.z2gyNF;
|
|
value9 = Reflect.apply(string, intl, [z2gyNF]);
|
|
r6 = value9;
|
|
}
|
|
binding = env2_1;
|
|
binding5 = env2_3;
|
|
value11 = binding(binding5[84]);
|
|
show = value11.show;
|
|
object2 = {};
|
|
binding = env2_0;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
Vd1hs6 = t.Vd1hs6;
|
|
object2.title = Reflect.apply(string, intl, [Vd1hs6]);
|
|
object2.body = r6;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
BddRzS = t.BddRzS;
|
|
object2.confirmText = Reflect.apply(string, intl, [BddRzS]);
|
|
Reflect.apply(show, value11, [object2]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
value5 = Reflect.apply(MESSAGE_CROSSPOST, binding, [require, importDefault]);
|
|
} catch (error) {
|
|
status = error.status;
|
|
if (status === 429) {
|
|
binding = env2_0;
|
|
binding4 = env2_3;
|
|
intl = binding(binding4[45]).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = binding(binding4[45]).t['77cuqz'];
|
|
Math = global.Math;
|
|
floor = Math.floor;
|
|
body = error.body;
|
|
retry_after = body.retry_after;
|
|
value10 = Reflect.apply(formatToPlainString, intl, [property, {retryAfter: Reflect.apply(floor, Math,
|
|
[retry_after / 60])}]);
|
|
r6 = value10;
|
|
} else {
|
|
binding = env2_0;
|
|
binding3 = env2_3;
|
|
intl = binding(binding3[45]).intl;
|
|
string = intl.string;
|
|
z2gyNF = binding(binding3[45]).t.z2gyNF;
|
|
value9 = Reflect.apply(string, intl, [z2gyNF]);
|
|
r6 = value9;
|
|
}
|
|
binding = env2_1;
|
|
binding5 = env2_3;
|
|
value11 = binding(binding5[84]);
|
|
show = value11.show;
|
|
object2 = {};
|
|
binding = env2_0;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
Vd1hs6 = t.Vd1hs6;
|
|
object2.title = Reflect.apply(string, intl, [Vd1hs6]);
|
|
object2.body = r6;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
BddRzS = t.BddRzS;
|
|
object2.confirmText = Reflect.apply(string, intl, [BddRzS]);
|
|
Reflect.apply(show, value11, [object2]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
object2.url = value5;
|
|
} catch (error) {
|
|
status = error.status;
|
|
if (status === 429) {
|
|
binding = env2_0;
|
|
binding4 = env2_3;
|
|
intl = binding(binding4[45]).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = binding(binding4[45]).t['77cuqz'];
|
|
Math = global.Math;
|
|
floor = Math.floor;
|
|
body = error.body;
|
|
retry_after = body.retry_after;
|
|
value10 = Reflect.apply(formatToPlainString, intl, [property, {retryAfter: Reflect.apply(floor, Math,
|
|
[retry_after / 60])}]);
|
|
r6 = value10;
|
|
} else {
|
|
binding = env2_0;
|
|
binding3 = env2_3;
|
|
intl = binding(binding3[45]).intl;
|
|
string = intl.string;
|
|
z2gyNF = binding(binding3[45]).t.z2gyNF;
|
|
value9 = Reflect.apply(string, intl, [z2gyNF]);
|
|
r6 = value9;
|
|
}
|
|
binding = env2_1;
|
|
binding5 = env2_3;
|
|
value11 = binding(binding5[84]);
|
|
show = value11.show;
|
|
object2 = {};
|
|
binding = env2_0;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
Vd1hs6 = t.Vd1hs6;
|
|
object2.title = Reflect.apply(string, intl, [Vd1hs6]);
|
|
object2.body = r6;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
BddRzS = t.BddRzS;
|
|
object2.confirmText = Reflect.apply(string, intl, [BddRzS]);
|
|
Reflect.apply(show, value11, [object2]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
value6 = Reflect.apply(post, HTTP, [object2]);
|
|
} catch (error) {
|
|
status = error.status;
|
|
if (status === 429) {
|
|
binding = env2_0;
|
|
binding4 = env2_3;
|
|
intl = binding(binding4[45]).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = binding(binding4[45]).t['77cuqz'];
|
|
Math = global.Math;
|
|
floor = Math.floor;
|
|
body = error.body;
|
|
retry_after = body.retry_after;
|
|
value10 = Reflect.apply(formatToPlainString, intl, [property, {retryAfter: Reflect.apply(floor, Math,
|
|
[retry_after / 60])}]);
|
|
r6 = value10;
|
|
} else {
|
|
binding = env2_0;
|
|
binding3 = env2_3;
|
|
intl = binding(binding3[45]).intl;
|
|
string = intl.string;
|
|
z2gyNF = binding(binding3[45]).t.z2gyNF;
|
|
value9 = Reflect.apply(string, intl, [z2gyNF]);
|
|
r6 = value9;
|
|
}
|
|
binding = env2_1;
|
|
binding5 = env2_3;
|
|
value11 = binding(binding5[84]);
|
|
show = value11.show;
|
|
object2 = {};
|
|
binding = env2_0;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
Vd1hs6 = t.Vd1hs6;
|
|
object2.title = Reflect.apply(string, intl, [Vd1hs6]);
|
|
object2.body = r6;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
BddRzS = t.BddRzS;
|
|
object2.confirmText = Reflect.apply(string, intl, [BddRzS]);
|
|
Reflect.apply(show, value11, [object2]);
|
|
return undefined;
|
|
}
|
|
yield value6;
|
|
try {
|
|
value7 = undefined;
|
|
value8 = false;
|
|
} catch (error) {
|
|
status = error.status;
|
|
if (status === 429) {
|
|
binding = env2_0;
|
|
binding4 = env2_3;
|
|
intl = binding(binding4[45]).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = binding(binding4[45]).t['77cuqz'];
|
|
Math = global.Math;
|
|
floor = Math.floor;
|
|
body = error.body;
|
|
retry_after = body.retry_after;
|
|
value10 = Reflect.apply(formatToPlainString, intl, [property, {retryAfter: Reflect.apply(floor, Math,
|
|
[retry_after / 60])}]);
|
|
r6 = value10;
|
|
} else {
|
|
binding = env2_0;
|
|
binding3 = env2_3;
|
|
intl = binding(binding3[45]).intl;
|
|
string = intl.string;
|
|
z2gyNF = binding(binding3[45]).t.z2gyNF;
|
|
value9 = Reflect.apply(string, intl, [z2gyNF]);
|
|
r6 = value9;
|
|
}
|
|
binding = env2_1;
|
|
binding5 = env2_3;
|
|
value11 = binding(binding5[84]);
|
|
show = value11.show;
|
|
object2 = {};
|
|
binding = env2_0;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
Vd1hs6 = t.Vd1hs6;
|
|
object2.title = Reflect.apply(string, intl, [Vd1hs6]);
|
|
object2.body = r6;
|
|
intl = binding(binding5[45]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[45]).t;
|
|
BddRzS = t.BddRzS;
|
|
object2.confirmText = Reflect.apply(string, intl, [BddRzS]);
|
|
Reflect.apply(show, value11, [object2]);
|
|
return undefined;
|
|
}
|
|
return value8 ? value7 : value7;
|
|
}
|
|
|
|
function _fun56180() { // fn#56180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:10679, offset: 0x013bfc8b, size: 715 bytes, params: 1, frame: 33
|
|
var environment;
|
|
var r7;
|
|
var r9;
|
|
var limitBinding;
|
|
var Math;
|
|
var floor;
|
|
var value10;
|
|
var object;
|
|
var value12;
|
|
var sort;
|
|
var value13;
|
|
var value14;
|
|
var value15;
|
|
const body = env0_0.body;
|
|
const value2 = before != null;
|
|
const value3 = after != null;
|
|
let r2 = messageId != null || body.length === limit && (value2 || before == null && after == null);
|
|
let r5 = messageId != null || value3 && body.length === limit;
|
|
if (messageId == null) {
|
|
r7 = r5;
|
|
r9 = r2;
|
|
} else {
|
|
Math = global.Math;
|
|
floor = Math.floor;
|
|
limitBinding = limit;
|
|
value10 = Reflect.apply(floor, Math, [limitBinding / 2]);
|
|
object = [messageId];
|
|
arraySpread(object, body.map(function(a0) {
|
|
return a0.id;
|
|
}), 1, undefined);
|
|
value12 = object.filter(_fun56182);
|
|
sort = value12.sort;
|
|
value13 = environment.__proto__.__proto__;
|
|
value14 = Reflect.apply(sort, value12, [(importDefault(21) /* metro dependency 21: SnowflakeUtils */).compare]);
|
|
value15 = value14.indexOf(messageId);
|
|
r2 = !(value15 < value10 + limitBinding % 2 - 1) && r2;
|
|
r5 = !(body.length - value15 < value10) && r5;
|
|
if (r5) {
|
|
if (body.length > 0) {
|
|
if (body[0].id !== ReadStateStore.lastMessageId(channelId)) {
|
|
r7 = r5;
|
|
r9 = r2;
|
|
} else {
|
|
r7 = false;
|
|
r9 = r2;
|
|
}
|
|
} else {
|
|
r7 = r5;
|
|
r9 = r2;
|
|
}
|
|
} else {
|
|
r7 = r5;
|
|
r9 = r2;
|
|
}
|
|
}
|
|
let binding = env2_51;
|
|
const log = binding.log;
|
|
const length = body.length;
|
|
const channelIdBinding = channelId;
|
|
Reflect.apply(log, binding,
|
|
['Fetched ' + length + ' messages for ' + channelIdBinding + ' isBefore:' + value2 + ' isAfter:' + value3]);
|
|
env1_12.markComplete();
|
|
const defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
const dispatch = defaultImport.dispatch;
|
|
object = {type: 'LOAD_MESSAGES_SUCCESS', channelId: channelIdBinding, messages: body, isBefore: value2,
|
|
isAfter: value3, hasMoreBefore: r9, hasMoreAfter: r7};
|
|
object.limit = limit;
|
|
object.jump = jump;
|
|
object.forICYMI = forICYMI;
|
|
binding = env1_9;
|
|
object.isStale = binding ? GatewayConnectionStore.lastTimeConnectedChanged() >= env1_10 : !binding;
|
|
object.truncate = truncate;
|
|
object.avoidInitialScroll = avoidInitialScroll;
|
|
Reflect.apply(dispatch, defaultImport, [object]);
|
|
const defaultImport2 = importDefault(4900) /* metro dependency 4900: MessageCacheStats */;
|
|
defaultImport2.recordChannelFetchedNetwork(channelId, fetchKey ?? env1_10, before, after, limit, body);
|
|
}
|
|
|
|
function _fun56187() { // fn#56187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:11755, offset: 0x013c02c5, size: 58 bytes, params: 1, frame: 15
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
value = env3_1(env3_3[62]);
|
|
return value.load(env0_0, require, env2_4);
|
|
}
|
|
|
|
function _fun56191() { // fn#56191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:12597, offset: 0x013c052b, size: 58 bytes, params: 1, frame: 15
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
value = env3_1(env3_3[62]);
|
|
return value.load(env0_0, require, importDefault);
|
|
}
|
|
|
|
function _fun56192({id}) { // fn#56192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:12739, offset: 0x013c0565, size: 60 bytes, params: 2, frame: 13
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
value = Reflect.apply(env3_1(env3_3[59]).compare, value, [id, id]);
|
|
return value > 0;
|
|
}
|
|
|
|
function _trySend() { // fn#56197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:14660, offset: 0x013c0b42, size: 37 bytes, params: 1, frame: 15
|
|
return env3_56._sendMessage(require, importDefault, dependencyMap);
|
|
}
|
|
|
|
function _fun56198(a0, a1) { // fn#56198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:14908, offset: 0x013c0b67, size: 51 bytes, params: 3, frame: 13
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
env3_23.whenReady(require, _fun56199);
|
|
}
|
|
|
|
function _fun56217(a0) { // fn#56217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:17548, offset: 0x013c1aff, size: 57 bytes, params: 2, frame: 15
|
|
env3_52.info('Finished converting channel to a private channel');
|
|
return env3_56._sendMessage(a0, importDefault, importAll);
|
|
}
|
|
|
|
function _fun56218(a0) { // fn#56218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:18991, offset: 0x013c1b38, size: 23 bytes, params: 2, frame: 11
|
|
return env3_16.getStickerById(a0);
|
|
}
|
|
|
|
function _fun56220(a0, a1) { // fn#56220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:20643, offset: 0x013c1b4f, size: 45 bytes, params: 3, frame: 13
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
return env3_0(env3_3[47]).getAttachmentPayload(a0, a1);
|
|
}
|
|
|
|
function _fun56221(a0, a1) { // fn#56221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:20921, offset: 0x013c1b7c, size: 191 bytes, params: 3, frame: 21
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const Date = global.Date;
|
|
const env0_2 = Date.now();
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
const binding = env3_1;
|
|
const binding2 = env3_3;
|
|
const env0_3 = binding(binding2[74]).length;
|
|
const Math = global.Math;
|
|
const floor = Math.floor;
|
|
const Math2 = global.Math;
|
|
const value3 = Reflect.apply(floor, Math, [10000 * Math2.random()]);
|
|
env3_52.info('Queueing message to be sent LogId:' + value3);
|
|
value = binding(binding2[74]);
|
|
value.enqueue(env0_14, _fun56222, value3);
|
|
}
|
|
|
|
function _fun56241(a0) { // fn#56241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:30564, offset: 0x013c3698, size: 417 bytes, params: 2, frame: 21
|
|
var r8;
|
|
var value3;
|
|
var binding;
|
|
var AUTOMOD_ERROR_CODES;
|
|
var body;
|
|
var object3;
|
|
var value5;
|
|
var binding2;
|
|
var value7;
|
|
var dispatch;
|
|
var object4;
|
|
const value = a0;
|
|
let hasErr = value.hasErr;
|
|
if (hasErr) {
|
|
r8 = !hasErr;
|
|
} else {
|
|
value3 = environment.__proto__.__proto__.__proto__;
|
|
AUTOMOD_ERROR_CODES = env3_0(env3_3[80]).AUTOMOD_ERROR_CODES;
|
|
r8 = AUTOMOD_ERROR_CODES.has(value.body.code);
|
|
}
|
|
if (r8) {
|
|
object3 = {};
|
|
value5 = environment.__proto__.__proto__.__proto__;
|
|
binding = env3_0;
|
|
binding2 = env3_3;
|
|
object3.type = binding(binding2[74]).MessageDataType.EDIT;
|
|
object3.message = env0_0;
|
|
binding = env3_1;
|
|
value7 = binding(binding2[48]);
|
|
dispatch = value7.dispatch;
|
|
object4 = {type: 'MESSAGE_EDIT_FAILED_AUTOMOD', messageData: object3};
|
|
object3 = {};
|
|
body = value.body;
|
|
object3.code = body.code;
|
|
body = value.body;
|
|
object3.message = body.message;
|
|
object4.errorResponseBody = object3;
|
|
Reflect.apply(dispatch, value7, [object4]);
|
|
}
|
|
hasErr = value.hasErr;
|
|
binding = env3_0;
|
|
const binding3 = env3_3;
|
|
const value9 = undefined;
|
|
const AccessibilityAnnouncer = binding(binding3[83]).AccessibilityAnnouncer;
|
|
const announce = AccessibilityAnnouncer.announce;
|
|
const intl = binding(binding3[45]).intl;
|
|
const string = intl.string;
|
|
const t = binding(binding3[45]).t;
|
|
if (hasErr) {
|
|
Reflect.apply(announce, AccessibilityAnnouncer, [Reflect.apply(string, intl, [t.Atp7FP])]);
|
|
} else if (r8) {
|
|
Reflect.apply(announce, AccessibilityAnnouncer, [Reflect.apply(string, intl, [t.Hym4ix])]);
|
|
} else {
|
|
Reflect.apply(announce, AccessibilityAnnouncer, [Reflect.apply(string, intl, [t['0x1HBD']])]);
|
|
}
|
|
binding = env3_56;
|
|
binding.endEditMessage(require, value.hasErr ? value9 : value);
|
|
env3_56.focusMessage({channelId: require, messageId: importDefault});
|
|
return value9;
|
|
}
|
|
|
|
function dispatchDelete() { // fn#56254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:31938, offset: 0x013c3c62, size: 83 bytes, params: 1, frame: 14
|
|
var environment;
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
value = Reflect.apply(env3_1(env3_3[48]).dispatch, value, [{type: 'MESSAGE_DELETE', id: importDefault,
|
|
channelId: require}]);
|
|
value.then(_fun56255);
|
|
}
|
|
|
|
function _fun56199() { // fn#56199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:14931, offset: 0x013c0b9a, size: 93 bytes, params: 1, frame: 15
|
|
let value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
const binding = env4_52;
|
|
const info = binding.info;
|
|
value = environment.__proto__.__proto__.__proto__;
|
|
Reflect.apply(info, binding, ['Channel ' + require + ' is ready for sending now.']);
|
|
value = environment.__proto__;
|
|
value = env1_0();
|
|
value.then(env0_0, require);
|
|
}
|
|
|
|
function _fun56222(a0) { // fn#56222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:21067, offset: 0x013c1c3b, size: 2843 bytes, params: 2, frame: 33
|
|
var environment;
|
|
var code;
|
|
var r8;
|
|
var r1;
|
|
var EXPLICIT_CONTENT;
|
|
var attachments;
|
|
var status;
|
|
var message_id;
|
|
var guild_id;
|
|
var r15;
|
|
var id;
|
|
var location2;
|
|
var r10;
|
|
var binding;
|
|
var log;
|
|
var object3;
|
|
var hasErr;
|
|
var body;
|
|
var value4;
|
|
var AUTOMOD_ERROR_CODES;
|
|
var has;
|
|
var value5;
|
|
var sendClydeError;
|
|
var value8;
|
|
var dispatch;
|
|
var value10;
|
|
var value11;
|
|
var object5;
|
|
var retry_after;
|
|
var binding2;
|
|
var value14;
|
|
var value15;
|
|
var value18;
|
|
var value19;
|
|
var value20;
|
|
var sendExplicitMediaClydeError;
|
|
var value21;
|
|
var binding4;
|
|
var value22;
|
|
var value23;
|
|
var value24;
|
|
var logMessageSendFailure;
|
|
var deleteMessage;
|
|
var value27;
|
|
var value28;
|
|
var value29;
|
|
var value30;
|
|
var donateSentMessage;
|
|
var value31;
|
|
var contentBinding;
|
|
var value32;
|
|
var receiveMessage;
|
|
var alsoForwardToChannelId;
|
|
var binding5;
|
|
var value33;
|
|
var sendForward;
|
|
var value34;
|
|
var value38;
|
|
var request;
|
|
var pendingReplyActionSource;
|
|
var channel;
|
|
var value43;
|
|
var track;
|
|
var MESSAGE_SHORTCUT_ACTION_SENT;
|
|
var value44;
|
|
var collectGuildAnalyticsMetadata;
|
|
var value45;
|
|
var channel2;
|
|
var currentUser;
|
|
var value49;
|
|
var binding6;
|
|
var value55;
|
|
var object6;
|
|
var locationBinding;
|
|
var value56;
|
|
var gifMetadata;
|
|
var id3;
|
|
var channel3;
|
|
var binding7;
|
|
var value58;
|
|
var MESSAGE_SENT_WITH_GIF;
|
|
var value59;
|
|
var value60;
|
|
const env0_0 = a0;
|
|
const Date = global.Date;
|
|
let value = Date.now();
|
|
value -= env0_2;
|
|
if (a0.ok) {
|
|
binding = env4_1;
|
|
value29 = undefined;
|
|
value30 = binding(env4_3[67]);
|
|
donateSentMessage = value30.donateSentMessage;
|
|
value31 = environment.__proto__;
|
|
contentBinding = content;
|
|
value32 = environment.__proto__.__proto__.__proto__;
|
|
Reflect.apply(donateSentMessage, value30, [contentBinding, require]);
|
|
binding = env4_56;
|
|
receiveMessage = binding.receiveMessage;
|
|
body = a0.body;
|
|
object3 = {};
|
|
object3.sendAnalytics = {duration: value, queueSize: length};
|
|
object3.poll = poll;
|
|
Reflect.apply(receiveMessage, binding, [require, body, true, object3]);
|
|
alsoForwardToChannelId = importAll.alsoForwardToChannelId;
|
|
value = null;
|
|
if (value != alsoForwardToChannelId) {
|
|
binding = env4_1;
|
|
binding5 = env4_3;
|
|
value33 = binding(binding5[77]);
|
|
sendForward = value33.sendForward;
|
|
binding = env4_0;
|
|
value34 = binding(binding5[54]);
|
|
Reflect.apply(sendForward, value33, [value34.createMessageRecord(a0.body),
|
|
importAll.alsoForwardToChannelId]).then(_fun56223).catch(_fun56224);
|
|
}
|
|
binding = env4_1;
|
|
value38 = binding(env4_3[59]).cast(require);
|
|
binding = env4_9;
|
|
request = binding.getRequest(value38);
|
|
if (value != request) {
|
|
env4_0(env4_3[78]).trackMemberApplicationInterviewMessage({guildId: request.guildId, channelId: require,
|
|
messageId: a0.body.id, joinRequestStatus: request.applicationStatus,
|
|
joinRequestUserId: request.userId});
|
|
}
|
|
binding = env4_11;
|
|
binding.recordMessageSendApiResponse(env1_11);
|
|
binding = env1_10;
|
|
if (binding === env4_37.REPLY) {
|
|
id = a0.body.id;
|
|
message_id = value == messageReference ? value29 : messageReference.message_id;
|
|
binding = env4_13;
|
|
pendingReplyActionSource = binding.getPendingReplyActionSource(require);
|
|
if (pendingReplyActionSource === 'message_swipe') {
|
|
r15 = value != message_id ? env4_23.getMessage(require, message_id) : value;
|
|
binding = env4_19;
|
|
channel2 = binding.getChannel(require);
|
|
binding = env4_27;
|
|
currentUser = binding.getCurrentUser();
|
|
binding = env4_1;
|
|
value49 = binding(env4_3[43]);
|
|
value49.track(env4_29.MESSAGE_SWIPE_ACTION_SENT, {message_id: id, channel_id: require,
|
|
guild_id: value == channel2 ? value29 : channel2.guild_id, swipe_action: 'reply',
|
|
is_own_message: value != currentUser && currentUser.id === (value == r15 ? value29 : r15.author.id)});
|
|
} else if (pendingReplyActionSource === 'message_shortcut') {
|
|
binding = env4_19;
|
|
channel = binding.getChannel(require);
|
|
binding = env4_1;
|
|
value43 = binding(env4_3[43]);
|
|
track = value43.track;
|
|
MESSAGE_SHORTCUT_ACTION_SENT = env4_29.MESSAGE_SHORTCUT_ACTION_SENT;
|
|
object3 = {message_id: id, channel_id: require};
|
|
guild_id = value == channel ? value29 : channel.guild_id;
|
|
object3.guild_id = guild_id;
|
|
object3.original_message_id = message_id;
|
|
object3.action = 'reply';
|
|
binding = env4_0;
|
|
value44 = binding(env4_3[35]);
|
|
collectGuildAnalyticsMetadata = value44.collectGuildAnalyticsMetadata;
|
|
guild_id = value == channel ? value29 : channel.guild_id;
|
|
copyDataProperties(object3, Reflect.apply(collectGuildAnalyticsMetadata, value44, [guild_id]), true);
|
|
binding = env4_0;
|
|
value45 = binding(env4_3[35]);
|
|
copyDataProperties(object3, value45.collectChannelAnalyticsMetadata(channel), true);
|
|
Reflect.apply(track, value43, [MESSAGE_SHORTCUT_ACTION_SENT, object3]);
|
|
}
|
|
}
|
|
binding = env4_1;
|
|
binding6 = env4_3;
|
|
binding(binding6[48]).dispatch({type: 'SLOWMODE_RESET_COOLDOWN', slowmodeType: env4_26.SendMessage,
|
|
channelId: require});
|
|
binding(binding6[48]).dispatch({type: 'EMOJI_TRACK_USAGE', emojiUsed: validNonShortcutEmojis});
|
|
binding(binding6[48]).dispatch({type: 'STICKER_TRACK_USAGE', stickerIds: stickerIds});
|
|
value55 = binding(binding6[48]);
|
|
dispatch = value55.dispatch;
|
|
object6 = {channel_id: require};
|
|
binding = env4_27;
|
|
object6.author = binding.getCurrentUser();
|
|
Reflect.apply(dispatch, value55, [{type: 'LOCAL_MESSAGE_CREATE', message: object6}]);
|
|
object3 = {};
|
|
object3.content = content;
|
|
object3.channelId = require;
|
|
body = a0.body;
|
|
id = body.id;
|
|
object3.messageId = id;
|
|
locationBinding = location;
|
|
value56 = 'chat_input';
|
|
object3.location = value != locationBinding ? location : value56;
|
|
object3.inviteAnalyticsMetadata = inviteAnalyticsMetadata;
|
|
trackCodedLinks(object3);
|
|
contentBinding = content;
|
|
body = a0.body;
|
|
id = body.id;
|
|
trackGiftCodes(contentBinding, require, id, value != location ? location : value56,
|
|
!!importAll.isGiftLinkSentOnBehalfOfUser);
|
|
gifMetadata = importAll.gifMetadata;
|
|
if (value != gifMetadata) {
|
|
gifMetadata = importAll.gifMetadata;
|
|
id3 = a0.body.id;
|
|
location2 = value != location ? location : value56;
|
|
binding = env4_19;
|
|
channel3 = binding.getChannel(require);
|
|
if (value != channel3) {
|
|
binding = env4_1;
|
|
binding7 = env4_3;
|
|
value58 = binding(binding7[43]);
|
|
track = value58.track;
|
|
MESSAGE_SENT_WITH_GIF = env4_29.MESSAGE_SENT_WITH_GIF;
|
|
object3 = {location: location2, message_id: id3};
|
|
object3.gif_provider = gifMetadata.gif_provider;
|
|
object3.load_id = gifMetadata.load_id;
|
|
object3.source_object = gifMetadata.source_object;
|
|
object3.gif_url = gifMetadata.gif_url;
|
|
object3.gif_id = gifMetadata.gif_id;
|
|
binding = env4_0;
|
|
value59 = binding(binding7[35]);
|
|
copyDataProperties(object3, value59.collectGuildAnalyticsMetadata(channel3.getGuildId()), id);
|
|
value60 = binding(binding7[35]);
|
|
copyDataProperties(object3, value60.collectChannelAnalyticsMetadata(channel3), id);
|
|
Reflect.apply(track, value58, [MESSAGE_SENT_WITH_GIF, object3]);
|
|
}
|
|
}
|
|
object3 = {};
|
|
object3.channelId = require;
|
|
body = a0.body;
|
|
id = body.id;
|
|
object3.messageId = id;
|
|
body = a0.body;
|
|
attachments = body.attachments;
|
|
r10 = value != attachments ? attachments : [];
|
|
object3.attachments = r10;
|
|
r10 = value != attachmentsToUpload ? attachmentsToUpload : [];
|
|
object3.attachmentsToUpload = r10;
|
|
trackClipsShared(object3);
|
|
if (value != uploader) {
|
|
env4_1(env4_3[48]).dispatch({type: 'UPLOAD_COMPLETE', channelId: require, file: uploader._file,
|
|
aborted: false});
|
|
}
|
|
env0_0(a0);
|
|
} else {
|
|
binding = env4_51;
|
|
log = binding.log;
|
|
object3 = {};
|
|
hasErr = a0.hasErr;
|
|
object3.hasErr = hasErr;
|
|
status = a0.status;
|
|
object3.status = status;
|
|
body = a0.body;
|
|
value = undefined;
|
|
code = body == null ? value : body.code;
|
|
object3.code = code;
|
|
object3.error = a0.err;
|
|
Reflect.apply(log, binding, ['Failed to send message', object3]);
|
|
hasErr = a0.hasErr;
|
|
if (hasErr) {
|
|
if (a0.err.code !== 'ABORTED') {
|
|
r1 = false;
|
|
EXPLICIT_CONTENT = value;
|
|
} else {
|
|
r1 = true;
|
|
EXPLICIT_CONTENT = value;
|
|
}
|
|
} else {
|
|
status = a0.status;
|
|
value4 = false;
|
|
if (status >= 400) {
|
|
if (a0.status < 500) {
|
|
body = a0.body;
|
|
if (body) {
|
|
body = a0.body;
|
|
code = body.code;
|
|
if (code === env4_28.SLOWMODE_RATE_LIMITED) {
|
|
retry_after = a0.body.retry_after;
|
|
if (retry_after != null && retry_after > 0) {
|
|
binding = env4_1;
|
|
binding2 = env4_3;
|
|
value14 = binding(binding2[48]);
|
|
dispatch = value14.dispatch;
|
|
object3 = {type: 'SLOWMODE_SET_COOLDOWN'};
|
|
value15 = environment.__proto__.__proto__.__proto__;
|
|
object3.channelId = require;
|
|
object3.slowmodeType = env4_26.SendMessage;
|
|
object3.cooldownMs = retry_after * binding(binding2[79]).Millis.SECOND;
|
|
Reflect.apply(dispatch, value14, [object3]);
|
|
r1 = value4;
|
|
EXPLICIT_CONTENT = value;
|
|
} else {
|
|
r1 = value4;
|
|
EXPLICIT_CONTENT = value;
|
|
}
|
|
} else {
|
|
binding = env4_0;
|
|
AUTOMOD_ERROR_CODES = binding(env4_3[80]).AUTOMOD_ERROR_CODES;
|
|
has = AUTOMOD_ERROR_CODES.has;
|
|
body = a0.body;
|
|
code = body.code;
|
|
if (Reflect.apply(has, AUTOMOD_ERROR_CODES, [code])) {
|
|
value10 = env4_1(env4_3[48]);
|
|
dispatch = value10.dispatch;
|
|
object3 = {type: 'MESSAGE_SEND_FAILED_AUTOMOD'};
|
|
value11 = environment.__proto__;
|
|
object3.messageData = env1_14;
|
|
object5 = {};
|
|
body = a0.body;
|
|
object5.code = body.code;
|
|
body = a0.body;
|
|
object5.message = body.message;
|
|
object3.errorResponseBody = object5;
|
|
Reflect.apply(dispatch, value10, [object3]);
|
|
r1 = value4;
|
|
EXPLICIT_CONTENT = value;
|
|
} else {
|
|
code = a0.body.code;
|
|
if (code === env4_28.POGGERMODE_TEMPORARILY_DISABLED) {
|
|
env4_1(env4_3[48]).dispatch({type: 'POGGERMODE_TEMPORARILY_DISABLED'});
|
|
r1 = value4;
|
|
EXPLICIT_CONTENT = value;
|
|
} else {
|
|
code = a0.body.code;
|
|
EXPLICIT_CONTENT = env4_28.EXPLICIT_CONTENT;
|
|
if (code === EXPLICIT_CONTENT) {
|
|
EXPLICIT_CONTENT = env4_48.EXPLICIT_CONTENT;
|
|
r1 = value4;
|
|
} else {
|
|
value5 = environment.__proto__;
|
|
r8 = poll != null || env1_9;
|
|
r8 = !r8 ? contentInventoryEntry != null : r8;
|
|
if (r8) {
|
|
r1 = value4;
|
|
EXPLICIT_CONTENT = value;
|
|
} else {
|
|
binding = env4_56;
|
|
sendClydeError = binding.sendClydeError;
|
|
value8 = environment.__proto__.__proto__.__proto__;
|
|
Reflect.apply(sendClydeError, binding, [require, a0.body.code]);
|
|
r1 = value4;
|
|
EXPLICIT_CONTENT = value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
r1 = value4;
|
|
EXPLICIT_CONTENT = value;
|
|
}
|
|
} else {
|
|
r1 = value4;
|
|
EXPLICIT_CONTENT = value;
|
|
}
|
|
} else {
|
|
r1 = value4;
|
|
EXPLICIT_CONTENT = value;
|
|
}
|
|
}
|
|
if (r1) {
|
|
binding = env4_56;
|
|
deleteMessage = binding.deleteMessage;
|
|
value27 = environment.__proto__.__proto__.__proto__;
|
|
value28 = environment.__proto__;
|
|
Reflect.apply(deleteMessage, binding, [require, env1_12, true]);
|
|
} else {
|
|
value18 = environment.__proto__;
|
|
if (uploader != null) {
|
|
value19 = env4_1(env4_3[48]);
|
|
dispatch = value19.dispatch;
|
|
value20 = environment.__proto__.__proto__.__proto__;
|
|
Reflect.apply(dispatch, value19, [{type: 'UPLOAD_FAIL', channelId: require, file: uploader._file,
|
|
messageId: env1_12, reason: EXPLICIT_CONTENT, noSendFailed: true}]);
|
|
}
|
|
hasErr = a0.hasErr;
|
|
if (!hasErr) {
|
|
if (EXPLICIT_CONTENT === env4_48.EXPLICIT_CONTENT) {
|
|
binding = env4_56;
|
|
sendExplicitMediaClydeError = binding.sendExplicitMediaClydeError;
|
|
value21 = environment.__proto__.__proto__.__proto__;
|
|
body = a0.body;
|
|
Reflect.apply(sendExplicitMediaClydeError, binding, [require,
|
|
body == null ? value : body.attachments,
|
|
env4_0(env4_3[52]).TrackMediaRedactionContext.EXPLICIT_MEDIA_MESSAGE_SEND_BLOCKED]);
|
|
}
|
|
}
|
|
binding = env4_1;
|
|
binding4 = env4_3;
|
|
value22 = binding(binding4[48]);
|
|
dispatch = value22.dispatch;
|
|
value23 = environment.__proto__.__proto__.__proto__;
|
|
Reflect.apply(dispatch, value22, [{type: 'MESSAGE_SEND_FAILED', messageId: env1_12, channelId: require,
|
|
shouldNotify: !importAll.doNotNotifyOnError, reason: EXPLICIT_CONTENT}]);
|
|
binding = env4_0;
|
|
value24 = binding(binding4[76]);
|
|
logMessageSendFailure = value24.logMessageSendFailure;
|
|
object3 = {};
|
|
hasErr = a0.hasErr;
|
|
object3.failureCode = hasErr ? value : a0.status;
|
|
hasErr = a0.hasErr;
|
|
object3.errorMessage = hasErr ? a0.err.message : value;
|
|
Reflect.apply(logMessageSendFailure, value24, [object3]);
|
|
binding = env4_1;
|
|
binding(env4_3[74]).cancelPendingSendRequests(require).forEach(_fun56231);
|
|
}
|
|
require(a0);
|
|
}
|
|
}
|
|
|
|
function _fun56255() { // fn#56255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:32030, offset: 0x013c3cb5, size: 93 bytes, params: 1, frame: 16
|
|
const binding = env4_0;
|
|
const binding2 = env4_3;
|
|
const AccessibilityAnnouncer = binding(binding2[83]).AccessibilityAnnouncer;
|
|
const announce = AccessibilityAnnouncer.announce;
|
|
const intl = binding(binding2[45]).intl;
|
|
const string = intl.string;
|
|
const RYMs7s = binding(binding2[45]).t.RYMs7s;
|
|
Reflect.apply(announce, AccessibilityAnnouncer, [Reflect.apply(string, intl, [RYMs7s])]);
|
|
}
|
|
|
|
function _fun56223() { // fn#56223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:21338, offset: 0x013c2756, size: 199 bytes, params: 1, frame: 18
|
|
const object2 = {};
|
|
let body = env0_0.body;
|
|
const value2 = undefined;
|
|
object2.referencedMessageId = body == null ? value2 : body.id;
|
|
body = env0_0.body;
|
|
object2.guildId = body == null ? value2 : body.guild_id;
|
|
body = env0_0.body;
|
|
object2.channelId = body == null ? value2 : body.channel_id;
|
|
object2.destinationChannelId = importAll.alsoForwardToChannelId;
|
|
const referencedMessageId = object2.referencedMessageId;
|
|
const guildId = object2.guildId;
|
|
const channelId = object2.channelId;
|
|
const destinationChannelId = object2.destinationChannelId;
|
|
const value3 = env5_1(env5_3[43]);
|
|
const track = value3.track;
|
|
const MESSAGE_ALSO_SEND_TO_CHANNEL_SENT = env5_29.MESSAGE_ALSO_SEND_TO_CHANNEL_SENT;
|
|
Reflect.apply(track, value3, [MESSAGE_ALSO_SEND_TO_CHANNEL_SENT, {referenced_message_id: referencedMessageId,
|
|
guild_id: guildId, channel_id: channelId, destination_channel_id: destinationChannelId}]);
|
|
return value2;
|
|
}
|
|
|
|
function _fun56224(a0) { // fn#56224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:21789, offset: 0x013c281d, size: 131 bytes, params: 2, frame: 18
|
|
let value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
|
|
const binding = env5_51;
|
|
const log = binding.log;
|
|
value = environment.__proto__;
|
|
value = 'Failed to forward thread message to parent channel LogId:' + env1_4;
|
|
const object2 = {};
|
|
const body = env0_0.body;
|
|
const value3 = undefined;
|
|
object2.referencedMessageId = body == null ? value3 : body.id;
|
|
object2.channelId = require;
|
|
object2.destinationChannelId = importAll.alsoForwardToChannelId;
|
|
object2.error = a0.toString();
|
|
Reflect.apply(log, binding, [value, object2]);
|
|
return value3;
|
|
}
|
|
|
|
function trackCodedLinks({content, channelId, messageId, location, inviteAnalyticsMetadata, overrideProperties = {}}) { // fn#56225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:23322, offset: 0x013c28a0, size: 132 bytes, params: 2, frame: 14
|
|
var environment;
|
|
const value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
|
|
const env0_5 = env5_18.getId();
|
|
env5_1(env5_3[30])(content).forEach(_fun56226);
|
|
}
|
|
|
|
function trackGiftCodes(a0, a1, a2, a3, a4) { // fn#56227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:25870, offset: 0x013c2f54, size: 86 bytes, params: 6, frame: 13
|
|
var environment;
|
|
const env0_0 = a1;
|
|
const env0_1 = a2;
|
|
const env0_2 = a3;
|
|
const env0_3 = a4;
|
|
let value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
|
|
value = env5_0(env5_3[42]);
|
|
value = value.findGiftCodes(a0);
|
|
value.forEach(_fun56228);
|
|
}
|
|
|
|
function trackClipsShared({channelId, messageId, attachments, attachmentsToUpload}) { // fn#56229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:26625, offset: 0x013c303f, size: 103 bytes, params: 2, frame: 14
|
|
var environment;
|
|
var value;
|
|
if (attachments.length === attachmentsToUpload.length) {
|
|
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
|
|
value = env5_19.getChannel(channelId);
|
|
if (value != null) {
|
|
attachmentsToUpload.forEach(_fun56230);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun56231(a0) { // fn#56231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:28757, offset: 0x013c31bd, size: 97 bytes, params: 2, frame: 15
|
|
const value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
|
|
const binding = env5_51;
|
|
binding.log('Cancelling pending message', a0.nonce);
|
|
env5_1(env5_3[48]).dispatch({type: 'MESSAGE_SEND_FAILED', messageId: a0.nonce, channelId: a0.channelId});
|
|
}
|
|
|
|
function _fun56226({type, code, url}) { // fn#56226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:23482, offset: 0x013c2924, size: 1584 bytes, params: 2, frame: 27
|
|
var binding3;
|
|
var value3;
|
|
var getAdMetadataSealed;
|
|
var QuestContent;
|
|
var value4;
|
|
var value5;
|
|
var trackQuestEvent;
|
|
var object2;
|
|
var value6;
|
|
var value7;
|
|
var guildTemplate;
|
|
var value9;
|
|
var applicationCodedLinkData;
|
|
var applicationId;
|
|
var binding4;
|
|
var value12;
|
|
var value14;
|
|
var params;
|
|
var value15;
|
|
var binding5;
|
|
var value17;
|
|
const value = environment.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__;
|
|
let binding = env6_0;
|
|
const isApplicationCodedLink2 = binding(env6_3[31]).isApplicationCodedLink(type);
|
|
binding = env6_0;
|
|
const binding2 = env6_3;
|
|
if (isApplicationCodedLink2) {
|
|
applicationCodedLinkData = binding(binding2[31]).getApplicationCodedLinkData(type, code, url);
|
|
if (applicationCodedLinkData == null) {
|
|
return undefined;
|
|
}
|
|
applicationId = applicationCodedLinkData.applicationId;
|
|
type = applicationCodedLinkData.type;
|
|
binding = env6_0;
|
|
if (binding(env6_3[32]).CodedLinkType.APP_DIRECTORY_PROFILE === type) {
|
|
binding = env6_0;
|
|
binding5 = env6_3;
|
|
binding(binding5[33]).trackAppDirectoryProfileEmbed(applicationId);
|
|
value17 = binding(binding5[34]);
|
|
value17.trackAppEmbedLinkSent(code, env6_46.APP_DISCOVERY, env0_5);
|
|
} else {
|
|
binding = env6_0;
|
|
if (binding(env6_3[32]).CodedLinkType.APP_DIRECTORY_STOREFRONT === type) {
|
|
env6_0(env6_3[33]).trackAppDirectoryProfileEmbed(applicationId, 'storefront');
|
|
} else {
|
|
binding = env6_0;
|
|
if (binding(env6_3[32]).CodedLinkType.APP_DIRECTORY_STOREFRONT_SKU === type) {
|
|
env6_0(env6_3[33]).trackAppDirectoryProfileEmbed(applicationId, 'storefront_sku');
|
|
} else {
|
|
binding = env6_0;
|
|
if (binding(env6_3[32]).CodedLinkType.ACTIVITY_BOOKMARK === type) {
|
|
params = applicationCodedLinkData.params;
|
|
value15 = env6_0(env6_3[34]);
|
|
value15.trackAppEmbedLinkSent(applicationId, env6_46.ACTIVITY, params.referrerId ?? env0_5,
|
|
params.customId);
|
|
} else {
|
|
binding = env6_0;
|
|
if (binding(env6_3[32]).CodedLinkType.APP_OAUTH2_LINK === type) {
|
|
binding = env6_0;
|
|
binding4 = env6_3;
|
|
value12 = binding(binding4[34]);
|
|
value12.trackAppEmbedLinkSent(applicationId, env6_46.OAUTH, env0_5);
|
|
binding = env6_1;
|
|
value14 = binding(binding4[35]);
|
|
value14.trackWithMetadata(env6_29.APP_OAUTH2_LINK_EMBED_URL_SENT,
|
|
{application_id: applicationId});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return undefined;
|
|
}
|
|
let CodedLinkType = binding(binding2[32]).CodedLinkType;
|
|
const INVITE = CodedLinkType.INVITE;
|
|
if (INVITE === type) {
|
|
env6_57({inviteKey: code, channelId: channelId, messageId: messageId, location: location,
|
|
inviteAnalyticsMetadata: inviteAnalyticsMetadata, overrideProperties: env0_4});
|
|
return undefined;
|
|
}
|
|
CodedLinkType = env6_0(env6_3[32]).CodedLinkType;
|
|
const TEMPLATE = CodedLinkType.TEMPLATE;
|
|
if (TEMPLATE === type) {
|
|
binding = env6_10;
|
|
guildTemplate = binding.getGuildTemplate(code);
|
|
if (guildTemplate == null) {
|
|
return undefined;
|
|
}
|
|
if (guildTemplate.state === env6_47.RESOLVING) {
|
|
return undefined;
|
|
}
|
|
binding = env6_1;
|
|
value9 = binding(env6_3[35]);
|
|
value9.trackWithMetadata(env6_29.GUILD_TEMPLATE_LINK_SENT, {guild_template_code: code,
|
|
guild_template_name: guildTemplate.name, guild_template_description: guildTemplate.description,
|
|
guild_template_guild_id: guildTemplate.sourceGuildId});
|
|
return undefined;
|
|
}
|
|
CodedLinkType = env6_0(env6_3[32]).CodedLinkType;
|
|
const BUILD_OVERRIDE = CodedLinkType.BUILD_OVERRIDE;
|
|
if (BUILD_OVERRIDE === type) {
|
|
return undefined;
|
|
}
|
|
CodedLinkType = env6_0(env6_3[32]).CodedLinkType;
|
|
const EXPERIMENT = CodedLinkType.EXPERIMENT;
|
|
if (EXPERIMENT === type) {
|
|
return undefined;
|
|
}
|
|
CodedLinkType = env6_0(env6_3[32]).CodedLinkType;
|
|
const MANUAL_BUILD_OVERRIDE = CodedLinkType.MANUAL_BUILD_OVERRIDE;
|
|
if (MANUAL_BUILD_OVERRIDE === type) {
|
|
return undefined;
|
|
}
|
|
CodedLinkType = env6_0(env6_3[32]).CodedLinkType;
|
|
const EVENT = CodedLinkType.EVENT;
|
|
if (EVENT === type) {
|
|
return undefined;
|
|
}
|
|
CodedLinkType = env6_0(env6_3[32]).CodedLinkType;
|
|
const CHANNEL_LINK = CodedLinkType.CHANNEL_LINK;
|
|
if (CHANNEL_LINK === type) {
|
|
return undefined;
|
|
}
|
|
CodedLinkType = env6_0(env6_3[32]).CodedLinkType;
|
|
const EMBEDDED_ACTIVITY_INVITE = CodedLinkType.EMBEDDED_ACTIVITY_INVITE;
|
|
if (EMBEDDED_ACTIVITY_INVITE === type) {
|
|
value7 = env6_0(env6_3[34]);
|
|
value7.trackAppEmbedLinkSent(code, env6_46.ACTIVITY_INVITE, env0_5);
|
|
return undefined;
|
|
}
|
|
CodedLinkType = env6_0(env6_3[32]).CodedLinkType;
|
|
const GUILD_PRODUCT = CodedLinkType.GUILD_PRODUCT;
|
|
if (GUILD_PRODUCT === type) {
|
|
return undefined;
|
|
}
|
|
CodedLinkType = env6_0(env6_3[32]).CodedLinkType;
|
|
const SERVER_SHOP = CodedLinkType.SERVER_SHOP;
|
|
if (SERVER_SHOP === type) {
|
|
return undefined;
|
|
}
|
|
CodedLinkType = env6_0(env6_3[32]).CodedLinkType;
|
|
const SOCIAL_LAYER_STOREFRONT = CodedLinkType.SOCIAL_LAYER_STOREFRONT;
|
|
if (SOCIAL_LAYER_STOREFRONT === type) {
|
|
return undefined;
|
|
}
|
|
CodedLinkType = env6_0(env6_3[32]).CodedLinkType;
|
|
const SOCIAL_LAYER_STOREFRONT_APP = CodedLinkType.SOCIAL_LAYER_STOREFRONT_APP;
|
|
if (SOCIAL_LAYER_STOREFRONT_APP === type) {
|
|
return undefined;
|
|
}
|
|
CodedLinkType = env6_0(env6_3[32]).CodedLinkType;
|
|
let QUESTS_EMBED = CodedLinkType.QUESTS_EMBED;
|
|
if (QUESTS_EMBED === type) {
|
|
binding = env6_0;
|
|
binding3 = env6_3;
|
|
value3 = binding(binding3[36]);
|
|
getAdMetadataSealed = value3.getAdMetadataSealed;
|
|
QuestContent = binding(binding3[37]).QuestContent;
|
|
QUESTS_EMBED = QuestContent.QUESTS_EMBED;
|
|
value4 = Reflect.apply(getAdMetadataSealed, value3, [QUESTS_EMBED]);
|
|
value5 = binding(binding3[38]);
|
|
trackQuestEvent = value5.trackQuestEvent;
|
|
object2 = {questId: code};
|
|
object2.event = env6_29.QUEST_LINK_SHARED;
|
|
value6 = null;
|
|
object2.properties = {metadata_sealed: value6 != value4 ? value4 : value6};
|
|
object2.trackGuildAndChannelMetadata = true;
|
|
binding = env6_0;
|
|
QuestContent = binding(env6_3[37]).QuestContent;
|
|
QUESTS_EMBED = QuestContent.QUESTS_EMBED;
|
|
object2.sourceQuestContent = QUESTS_EMBED;
|
|
Reflect.apply(trackQuestEvent, value5, [object2]);
|
|
return undefined;
|
|
}
|
|
CodedLinkType = env6_0(env6_3[32]).CodedLinkType;
|
|
const COLLECTIBLES_SHOP = CodedLinkType.COLLECTIBLES_SHOP;
|
|
if (COLLECTIBLES_SHOP === type) {
|
|
return undefined;
|
|
}
|
|
const Error = global.Error;
|
|
throw Error('Unknown coded link type: ' + type);
|
|
}
|
|
|
|
function _fun56228(a0) { // fn#56228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:25940, offset: 0x013c2faa, size: 149 bytes, params: 2, frame: 16
|
|
var value4;
|
|
var trackWithMetadata;
|
|
var GIFT_CODE_SENT;
|
|
var object2;
|
|
const channel = env6_19.getChannel(require);
|
|
if (channel != null) {
|
|
value4 = env6_1(env6_3[35]);
|
|
trackWithMetadata = value4.trackWithMetadata;
|
|
GIFT_CODE_SENT = env6_29.GIFT_CODE_SENT;
|
|
object2 = {};
|
|
object2.location = importAll;
|
|
object2.gift_code = a0;
|
|
object2.guild_id = channel.getGuildId();
|
|
object2.channel_id = channel.id;
|
|
object2.channel_type = channel.type;
|
|
object2.message_id = importDefault;
|
|
object2.automatic_send = env0_3;
|
|
Reflect.apply(trackWithMetadata, value4, [GIFT_CODE_SENT, object2]);
|
|
}
|
|
}
|
|
|
|
function _fun56230({clip}, a1) { // fn#56230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7245:26780, offset: 0x013c30a6, size: 279 bytes, params: 3, frame: 20
|
|
var value;
|
|
var binding;
|
|
var binding2;
|
|
var value2;
|
|
var track;
|
|
var CLIP_SHARED;
|
|
var object2;
|
|
var value3;
|
|
var id;
|
|
if (clip != null) {
|
|
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__;
|
|
binding = env6_1;
|
|
binding2 = env6_3;
|
|
value2 = binding(binding2[43]);
|
|
track = value2.track;
|
|
CLIP_SHARED = env6_29.CLIP_SHARED;
|
|
object2 = {};
|
|
binding = env6_2;
|
|
value = binding(binding2[44]);
|
|
copyDataProperties(object2, value.getClipBaseProperties(clip), value);
|
|
value3 = binding(binding2[44]);
|
|
copyDataProperties(object2, value3.getClipContextProperties('trackClipsShared'), value);
|
|
object2['channel_id'] = channelId;
|
|
binding = env0_3;
|
|
object2['guild_id'] = binding.getGuildId();
|
|
object2['channel_type'] = env0_3.type;
|
|
object2['application_id'] = clip.applicationId;
|
|
id = clip.id;
|
|
object2['clip_uuid'] = id;
|
|
object2['remote_clip_id'] = clip.remoteClipId;
|
|
object2['message_id'] = messageId;
|
|
id = attachments[a1].id;
|
|
object2['attachment_id'] = id;
|
|
Reflect.apply(track, value2, [CLIP_SHARED, object2]);
|
|
}
|
|
}
|
|
|