Files
2026-07-28 01:06:53 +03:00

4202 lines
266 KiB
TypeScript

/* Metro module 11347; source: modules/messages/native/MessagesHandlers.tsx; dependencies: [29, 5, 57, 6, 7, 5261, 4234, 6773, 10906, 4117, 8326, 7093, 4833, 9865, 3786, 5221, 1226, 1379, 4645, 8450, 1945, 1867, 4097, 6877, 4814, 3784, 4396, 1934, 3969, 6876, 7223, 1878, 4503, 8178, 661, 1346, 4118, 1880, 5267, 1243, 6789, 9877, 11348, 1962, 9834, 11349, 11379, 11380, 8214, 7709, 6802, 1244, 8850, 9759, 8769, 4080, 8776, 5068, 11395, 9875, 4093, 4116, 9876, 9874, 9835, 9837, 11065, 477, 8296, 6860, 11017, 8294, 11396, 9300, 8743, 21, 11398, 11399, 9864, 4633, 11401, 11419, 4081, 4082, 11172, 1230, 11005, 5260, 6522, 4863, 5051, 8217, 11420, 10216, 1391, 10588, 10259, 10592, 10593, 11421, 10265, 10656, 3853, 10599, 10794, 11328, 4098, 9052, 7147, 1581, 7091, 9480, 6533, 9484, 7120, 4101, 9856, 9857, 8879, 10437, 6947, 9318, 11422, 10558, 4105, 11430, 8870, 683, 5072, 5087, 8113, 4796, 8581, 6823, 7882, 8953, 7360, 5080, 8454, 11431, 7040, 7007, 11432, 10381, 11433, 1583, 7067, 7076, 7165, 8742, 480, 3857, 11434, 9836, 11435, 4627, 1909, 4647, 8056, 11437, 11439, 11443, 8244, 11444, 8118, 8277, 8275, 11445, 11449, 11452, 11453, 4601, 6797, 3856, 11464, 11465, 11466, 4246, 6946, 11467, 11468, 4821, 4813, 5263, 5074, 11470, 11197, 9546, 9544, 10609, 8006, 8216, 9879, 11504, 11505, 9591, 11506, 11509, 11512, 10536, 11513, 11516, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import ObjectWithoutProperties from '../../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import PermissionStore from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import JoinedThreadsStore from '../../threads/JoinedThreadsStore.tsx'; /* Metro dependency 3786 */
import ToastActionCreators from '../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */
import SelectedGuildStore from '../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import InviteStore from '../../../stores/InviteStore.tsx'; /* Metro dependency 4097 */
import GuildScheduledEventStore from '../../guild_scheduled_events/GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import ApplicationStore from '../../applications/ApplicationStore.tsx'; /* Metro dependency 4234 */
import PresenceStore from '../../../stores/PresenceStore.tsx'; /* Metro dependency 4396 */
import MessageStore from '../../../stores/MessageStore.tsx'; /* Metro dependency 4814 */
import ReferencedMessageStore from '../../replies/ReferencedMessageStore.tsx'; /* Metro dependency 4833 */
import UserAffinitiesV2Store from '../../user_affinities/UserAffinitiesV2Store.tsx'; /* Metro dependency 5221 */
import AgeVerificationStore from '../../age_assurance/AgeVerificationStore.tsx'; /* Metro dependency 5261 */
import ApplicationDirectoryApplicationsStore from '../../global_discovery_apps/stores/ApplicationDirectoryApplicationsStore.tsx'; /* Metro dependency 6773 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import SelfPresenceStore from '../../../stores/SelfPresenceStore.tsx'; /* Metro dependency 6876 */
import LocalActivityStore from '../../../stores/LocalActivityStore.tsx'; /* Metro dependency 6877 */
import QuestStore from '../../quests/QuestStore.tsx'; /* Metro dependency 7093 */
import UploadStore from '../../../stores/UploadStore.tsx'; /* Metro dependency 7223 */
import PremiumGiftingIntentStore from '../../premium/gifting/PremiumGiftingIntentStore.tsx'; /* Metro dependency 8326 */
import GiftCodeStore from '../../../stores/GiftCodeStore.tsx'; /* Metro dependency 8450 */
import NavigateToLastChannel from '../../main_tabs_v2/native/navigateToLastChannel.tsx'; /* Metro dependency 8776 */
import InstantInviteActionCreators from '../../../actions/InstantInviteActionCreators.tsx'; /* Metro dependency 8879 */
import SummaryStore from '../../summaries/SummaryStore.tsx'; /* Metro dependency 9865 */
import HandleAcceptEventInstantInvite from '../../guild_scheduled_events/native/handleAcceptEventInstantInvite.tsx'; /* Metro dependency 9876 */
import GuildIncidentsStore from '../../guild_antiraid/GuildIncidentsStore.tsx'; /* Metro dependency 10906 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ThreadConstantsModule from '../../threads/ThreadConstants.tsx'; /* Metro dependency 1243 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ExpressionPickerConstantsModule from '../../expression_picker/ExpressionPickerConstants.tsx'; /* Metro dependency 1346 */
import * as MetaQuestUtilsAndroidModule from '../../device/MetaQuestUtils.android.tsx'; /* Metro dependency 1581 */
import * as ToastUtilsModule from '../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as GuildScheduledEventStoreModule from '../../guild_scheduled_events/GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import * as ConstantsModule2 from '../../instant_invite/Constants.tsx'; /* Metro dependency 4118 */
import * as MessageConstantsModule from '../MessageConstants.tsx'; /* Metro dependency 4503 */
import * as TransitionToChannelModule from '../../routing/transitionToChannel.tsx'; /* Metro dependency 4601 */
import * as DraftStoreModule from '../../../stores/DraftStore.tsx'; /* Metro dependency 4645 */
import * as SafetyHubConstantsModule from '../../safety_hub/SafetyHubConstants.tsx'; /* Metro dependency 5267 */
import * as QuestContentModule from '../../../external/discord_common/js/shared/shared-constants/QuestContent.tsx'; /* Metro dependency 6533 */
import * as ClipboardUtilsNativeModule from '../../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */
import * as PrivateChannelCallUtilsModule from '../../../utils/native/PrivateChannelCallUtils.tsx'; /* Metro dependency 7709 */
import * as InteractionUtilsModule from '../../interactions/InteractionUtils.tsx'; /* Metro dependency 8056 */
import * as RowGeneratorConstantsModule from './renderer/RowGeneratorConstants.tsx'; /* Metro dependency 8178 */
import * as MessageAccessibilityActionsModule from './MessageAccessibilityActions.tsx'; /* Metro dependency 8216 */
import * as AgeGateUtilsModule from '../../age_gate/native/AgeGateUtils.tsx'; /* Metro dependency 8581 */
import * as MarkupReactCommandRuleModule from '../../markup/native/MarkupReactCommandRule.tsx'; /* Metro dependency 8769 */
import * as MessageDataSnowflakeUtilsModule from './snowflake/MessageDataSnowflakeUtils.tsx'; /* Metro dependency 9834 */
import * as CtaButtonUtilsModule from '../CtaButtonUtils.tsx'; /* Metro dependency 10609 */
import * as ReferralMessageUtilsModule from '../../premium/native/referrals/ReferralMessageUtils.tsx'; /* Metro dependency 11431 */
import * as PremiumGiftingIntentUtilsModule from '../../premium/gifting/utils/PremiumGiftingIntentUtils.tsx'; /* Metro dependency 11432 */
import * as ForumOriginalPosterModule from '../../forums/native/ForumOriginalPoster.tsx'; /* Metro dependency 11464 */
import * as VoiceMessageAnalyticsModule from '../../voice_messages/VoiceMessageAnalytics.tsx'; /* Metro dependency 11465 */
import * as MediaChannelActionCreatorsModule from '../../media_channel/MediaChannelActionCreators.tsx'; /* Metro dependency 11467 */
function _fun86761(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:6, offset: 0x01f9ef88, size: 1105 bytes, params: 8, frame: 19
const env0_0 = require;
const getCodedLinks = function(a0) {
var property = a0.type;
if (property === MessageTypes.THREAD_STARTER_MESSAGE) {
if (a0.messageReference != null) {
property = ReferencedMessageStore.getMessageByReference(a0.messageReference).message;
if (property == null) {
return undefined;
}
return property.codedLinks;
}
}
return a0.messageSnapshots.length > 0 ? a0.messageSnapshots[0].message.codedLinks : a0.codedLinks;
};
const env0_4 = ['messageId'];
const env0_5 = ['messageId'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ConstantsModule;
const env0_41 = value.ActivityActionTypes;
const env0_42 = value.ActivityFlags;
const env0_43 = value.ActivityGamePlatforms;
const env0_44 = value.ActivityTypes;
const env0_45 = value.AnalyticEvents;
const env0_46 = value.AnalyticsGameOpenTypes;
const env0_47 = value.AnalyticsLocations;
const env0_48 = value.AnalyticsObjects;
const env0_49 = value.AnalyticsObjectTypes;
const env0_50 = value.AnalyticsPages;
const env0_51 = value.AnalyticsSections;
const env0_52 = value.LinkingTypes;
const env0_53 = value.ME;
const env0_54 = value.MessageFlags;
const env0_55 = value.MessageStates;
const env0_56 = value.MessageTypes;
const env0_57 = value.Permissions;
const env0_58 = value.Routes;
const env0_59 = value.UpsellTypes;
const env0_60 = value.UserSettingsSections;
const env0_61 = value.WebBrowserType;
value = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_64 = value.PremiumTypes;
const env0_65 = value.PremiumUpsellTypes;
const PREMIUM_GIFT_INTENT_CARD = (AnalyticsLocation).PREMIUM_GIFT_INTENT_CARD;
object = [PREMIUM_GIFT_INTENT_CARD];
value = _fun86763();
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/MessagesHandlers.tsx');
exports.MessagesHandlers = value;
function _fun86763() { // fn#86763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:1533, offset: 0x01f9f458, size: 84 bytes, params: 1, frame: 15
return CreateClass(MessagesHandlers, [{key: 'params', get: function() {
return this.getParams();
}}, {key: 'replaceCorrectMessageParams', value: value_86898}]);
function MessagesHandlers(a0) { // fn#86764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:1554, offset: 0x01f9f4ac, size: 1427 bytes, params: 2, frame: 14
env1_9(this, MessagesHandlers);
this.getParams = a0;
this.getMessageData = getMessageData;
this.isModalOrActionsheetObstructing = isModalOrActionsheetObstructing;
this.handleTapImage = handleTapImage;
this.handleTapChannel = handleTapChannel;
this.handleLongPressChannel = handleLongPressChannel;
this.handleTapAttachmentLink = handleTapAttachmentLink;
this.handleLongPressAttachmentLink = handleLongPressAttachmentLink;
this.handleTapCall = handleTapCall;
this.handleTapMention = handleTapMention;
this.handleTapCommandMention = handleTapCommandMention_86780;
this.handleLongPressCommandMention = handleLongPressCommandMention_86783;
this.handleTapGameMention = handleTapGameMention;
this.handleTapGuildEventLink = handleTapGuildEventLink;
this.handleTapLink = handleTapLink;
this.handleLongPressLink = handleLongPressLink;
this.handleTapReaction = handleTapReaction;
this.handleTapReactionOverflow = handleTapReactionOverflow;
this.handleLongPressReaction = handleLongPressReaction;
this.handleOpenSticker = handleOpenSticker;
this.handleTapAvatar = handleTapAvatar;
this.handleTapUsername = handleTapUsername;
this.handleLongPressUsername = handleLongPressUsername;
this.handleOpenProfile = handleOpenProfile;
this.handleTapThreadEmbed = handleTapThreadEmbed;
this.handleTapReply = handleTapReply;
this.handleTapSummary = handleTapSummary;
this.handleTapSummaryJump = handleTapSummaryJump;
this.handleLongPressMessage = handleLongPressMessage;
this.handleInitiateReply = handleInitiateReply;
this.handleInitiateThread = handleInitiateThread;
this.handleInitiateEdit = handleInitiateEdit;
this.handleTapMessage = handleTapMessage;
this.handleDoubleTapMessage = handleDoubleTapMessage;
this.handleTapSeparator = handleTapSeparator;
this.handleTapCancelUploadItem = handleTapCancelUploadItem;
this.handleTapSpotifyResource = handleTapSpotifyResource;
this.handleTapActivityResource = handleTapActivityResource;
this.handleTapStreamRequest = handleTapStreamRequest;
this.handleTapActivityInviteToJoin = handleTapActivityInviteToJoin;
this.handleTapGuildEventInvite = handleTapGuildEventInvite;
this._questsEmbedOnPress = _questsEmbedOnPress;
this._questsEmbedOnAccept = _questsEmbedOnAccept;
this.handleTapInviteEmbedAccept = handleTapInviteEmbedAccept;
this.handleTapInviteEmbed = handleTapInviteEmbed;
this.handleTapVoiceChannelPreview = handleTapVoiceChannelPreview;
this.handleTapJoinActivity = handleTapJoinActivity;
this.handleTapJoinRichPresence = handleTapJoinRichPresence;
this.handleAcceptInstantInvite = handleAcceptInstantInvite;
this.handleTransitionToInviteChannel = handleTransitionToInviteChannel;
this.handleTapGiftCodeEmbed = function() {
};
this.handleTapGiftCodeAccept = handleTapGiftCodeAccept;
this.handleTapReferralRedeem = handleTapReferralRedeem;
this.getGiftIntentCtaContext = getGiftIntentCtaContext;
this.handleTapGiftIntentPrimaryCta = handleTapGiftIntentPrimaryCta;
this.handleTapGiftIntentSecondaryCta = handleTapGiftIntentSecondaryCta;
this.handleGiftIntentGIFSelected = _fun86834();
this.handleGiftIntentCardViewed = handleGiftIntentCardViewed;
this.handleTapEmoji = handleTapEmoji;
this.handleTapTimestamp = function(a0) {
require(dependencyMap[47]).contentHandlers.onTapTimestamp(a0);
};
this.handleTapInlineCode = function(a0) {
require(dependencyMap[47]).contentHandlers.onTapInlineCode(a0);
};
this.handleTapRoleIcon = handleTapRoleIcon;
this.handleTapVoiceChannelBadge = handleTapVoiceChannelBadge;
this.handleTapGameIcon = handleTapGameIcon;
this.handleTapSuppressNotificationsIcon = function() {
var defaultImport = importDefault(dependencyMap[151]);
var object = {key: 'SUPPRESS_NOTIFICATIONS_TOOLTIP'};
object.content = require(dependencyMap[51]).intl.string(require(dependencyMap[51]).t['RO/KYj']);
object.icon = importDefault(dependencyMap[153]);
defaultImport.open(object);
};
this.handleTapConnectionsRoleTag = handleTapConnectionsRoleTag;
this.handleTapTimeoutIcon = function() {
var defaultImport = importDefault(dependencyMap[151]);
var object = {key: 'GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY'};
object.content = require(dependencyMap[51]).intl.string(require(dependencyMap[51]).t['AeYyL+']);
object.icon = importDefault(dependencyMap[153]);
defaultImport.open(object);
};
this.handleReveal = handleReveal;
this.handleTapButtonActionComponent = handleTapButtonActionComponent;
this.handleTapSelectActionComponent = handleTapSelectActionComponent;
this.handleTapWelcomeReply = handleTapWelcomeReply;
this.handleTapInviteToSpeak = handleTapInviteToSpeak;
this.handleTapAutoModerationActions = handleTapAutoModerationActions;
this.handleTapAutoModerationFeedback = handleTapAutoModerationFeedback;
this.handleTransitionToThread = handleTransitionToThread_86856;
this.handleTransitionToMessage = handleTransitionToMessage;
this.handleTapFollowForumPost = handleTapFollowForumPost;
this.handleTapShareForumPost = function(a0) {
var {guildId, channelId} = require(dependencyMap[44]).getNativeSyntheticEventData(a0);
require(dependencyMap[64]).handleCopyLinkForumPost(guildId, channelId, {section: AnalyticsSections.CHANNEL});
};
this.handleTapSeeMore = function() {
};
this.handleCopyText = handleCopyText;
this.handleTapTag = handleTapTag;
this.handleTapOpTag = handleTapOpTag;
this.handleMediaAttachmentPlaybackStarted = handleMediaAttachmentPlaybackStarted;
this.handleMediaAttachmentPlaybackEnded = handleMediaAttachmentPlaybackEnded;
this.handleVoiceMessagePlaybackFailed = handleVoiceMessagePlaybackFailed;
this.handleTapPostPreviewEmbed = _fun86869();
this.handleTapDismissMediaPostSharePrompt = handleTapDismissMediaPostSharePrompt;
this.handleTapObscuredMediaLearnMore = handleTapObscuredMediaLearnMore;
this.onTapObscuredMediaToggle = _fun86875();
this.handleTapSafetyPolicyNoticeEmbed = handleTapSafetyPolicyNoticeEmbed;
this.handleTapSafetySystemNotificationCta = handleTapSafetySystemNotificationCta;
this.handleTapPollAnswer = handleTapPollAnswer;
this.handleTapPollSubmitVote = handleTapPollSubmitVote;
this.handleTapPollAction = handleTapPollAction;
this.handleLongPressPollImage = handleLongPressPollImage;
this.handleTapCtaButton = handleTapCtaButton;
this.handleMessageAccessibilityAction = handleMessageAccessibilityAction;
this.handleTapForwardFooter = handleTapForwardFooter;
this.handleTapInlineForward = handleTapInlineForward;
this.handleTapSoundmoji = function(a0) {
importDefault(dependencyMap[196])(require(dependencyMap[44]).getNativeSyntheticEventData(a0));
};
this.handleTapClanTagChiplet = handleTapClanTagChiplet;
this.handleTapContentInventoryEntryEmbed = handleTapContentInventoryEntryEmbed;
this.handleTapCheckpointCard = handleTapCheckpointCard;
this.handleTapAppMessageEmbed = handleTapAppMessageEmbed_86894;
this.handleTapPreviewSharedClientTheme = handleTapPreviewSharedClientTheme;
this.handleSharedClientThemeViewed = handleSharedClientThemeViewed;
function getMessageData(a0) { // fn#86765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:1656, owner: MessagesHandlers.getMessageData, offset: 0x01f9fa3f, size: 90 bytes, params: 2, frame: 13
const value = null;
if (value == a0) {
return value;
}
const getMessage = env0_0.params.getMessage;
const message = getMessage(a0);
if (value == message) {
return value;
}
const channel = ChannelStore.getChannel(message.channel_id);
return value == channel ? value : {message: message, messageChannel: channel};
}
function isModalOrActionsheetObstructing() { // fn#86766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:1862, owner: MessagesHandlers.isModalOrActionsheetObstructing, offset: 0x01f9fa99, size: 57 bytes, params: 1, frame: 11
let value = environment.__proto__.__proto__;
value = require(9877) /* metro dependency 9877: isAlertOrActionSheetOpen */;
return value.isAlertOrActionSheetOpen(env0_0.params.selectedChannelId);
}
function handleTapImage({nativeEvent}) { // fn#86767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:1951, owner: MessagesHandlers.handleTapImage, offset: 0x01f9fad2, size: 112 bytes, params: 2, frame: 14
var environment;
let value = nativeEvent.getMessageData(nativeEvent.id);
if (value != null) {
value = environment.__proto__.__proto__;
value = require(dependencyMap[43]);
value = value(dependencyMap[42], dependencyMap.paths);
value.then(_fun86768);
}
function _fun86768({handleMessagesTapImage}) { // fn#86768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:2042, offset: 0x01f9fb42, size: 87 bytes, params: 2, frame: 12
const binding = env0_1;
handleMessagesTapImage({tapImageData: nativeEvent, allowWithinModal: false, message: binding.message,
messageChannel: binding.messageChannel, selectedChannelId: env1_0.params.selectedChannelId});
}
}
function handleTapChannel(a0) { // fn#86769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:2237, owner: MessagesHandlers.handleTapChannel, offset: 0x01f9fb99, size: 121 bytes, params: 2, frame: 16
var environment;
var data;
var value;
const binding = env0_0;
if (!binding.isModalOrActionsheetObstructing()) {
value = environment.__proto__.__proto__;
value = require(dependencyMap[44]);
data = value.getNativeSyntheticEventData(a0).data;
value = require(dependencyMap[43]);
value = value(dependencyMap[45], dependencyMap.paths);
value.then(function({handleMessagesTapChannel}) {
handleMessagesTapChannel({data: data, dismissKeyboard: _fun86771});
});
}
function _fun86770({handleMessagesTapChannel}) { // fn#86770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:2366, offset: 0x01f9fc12, size: 45 bytes, params: 2, frame: 11
handleMessagesTapChannel({data: data, dismissKeyboard: dismissKeyboard_86771});
function dismissKeyboard_86771() { // fn#86771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:2425, offset: 0x01f9fc3f, size: 51 bytes, params: 1, frame: 10
const value = environment.__proto__.__proto__;
const binding = env2_0;
const getParams = binding.getParams;
return Reflect.apply(getParams, binding, []).chatInputRef.current?.dismissKeyboard();
}
}
}
function handleLongPressChannel(a0) { // fn#86772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:2554, owner: MessagesHandlers.handleLongPressChannel, offset: 0x01f9fc72, size: 121 bytes, params: 2, frame: 16
var environment;
var data;
var value;
const binding = env0_0;
if (!binding.isModalOrActionsheetObstructing()) {
value = environment.__proto__.__proto__;
value = require(dependencyMap[44]);
data = value.getNativeSyntheticEventData(a0).data;
value = require(dependencyMap[43]);
value = value(dependencyMap[46], dependencyMap.paths);
value.then(function({handleMessagesLongPressChannel}) {
handleMessagesLongPressChannel({data: data});
});
}
}
function handleTapAttachmentLink(a0) { // fn#86774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:2768, owner: MessagesHandlers.handleTapAttachmentLink, offset: 0x01f9fd0a, size: 69 bytes, params: 2, frame: 11
const binding = env0_0;
if (!binding.isModalOrActionsheetObstructing()) {
value = environment.__proto__.__proto__;
(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onTapAttachmentLink(a0);
}
}
function handleLongPressAttachmentLink(a0) { // fn#86775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:2896, owner: MessagesHandlers.handleLongPressAttachmentLink, offset: 0x01f9fd4f, size: 69 bytes, params: 2, frame: 11
const binding = env0_0;
if (!binding.isModalOrActionsheetObstructing()) {
value = environment.__proto__.__proto__;
(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onLongPressAttachmentLink(a0);
}
}
function handleTapCall(a0) { // fn#86776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:3014, owner: MessagesHandlers.handleTapCall, offset: 0x01f9fd94, size: 396 bytes, params: 2, frame: 22
var environment;
var showSimpleActionSheet;
var object2;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var items2;
var object3;
let value = environment.__proto__.__proto__;
const getNativeSyntheticEventData = MessageDataSnowflakeUtilsModule.getNativeSyntheticEventData;
const {channelId, messageId} = Reflect.apply(getNativeSyntheticEventData, MessageDataSnowflakeUtilsModule,
[a0]).data;
const channel = ChannelStore.getChannel(channelId);
if (channel != null && channel.isPrivate()) {
if ((require(8214) /* metro dependency 8214: useIsCallActive */).checkIsCallActive(channelId, messageId)) {
(require(7709) /* metro dependency 7709: PrivateChannelCallUtils */).handleJoinCall(channel);
} else {
value = require(6802) /* metro dependency 6802: showSimpleActionSheet */;
showSimpleActionSheet = value.showSimpleActionSheet;
object2 = {};
object2.label = intl.string(t.focH1t);
object2.IconComponent = (require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon;
object2.onPress = onPress_86777;
items2 = [object2];
object3 = {};
object3.label = intl.string(t.oCqlGG);
object3.IconComponent = (require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon;
object3.onPress = onPress_86778;
items2[1] = object3;
Reflect.apply(showSimpleActionSheet, value, [{'key': 'CallTap', 'options': null, 'hasIcons': true,
options: items2}]);
}
}
function handleTapCallOnPress() { // fn#86777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:3338, owner: MessagesHandlers.handleTapCall.onPress, offset: 0x01f9ff20, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__.__proto__;
(PrivateChannelCallUtilsModule).handleStartCall(env0_0);
}
function handleTapCallOnPress_86778() { // fn#86778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:3458, owner: MessagesHandlers.handleTapCall.onPress, offset: 0x01f9ff4d, size: 48 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
(PrivateChannelCallUtilsModule).handleStartCall(env0_0, true);
}
}
function handleTapMention(a0) { // fn#86779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:3540, owner: MessagesHandlers.handleTapMention, offset: 0x01f9ff7d, size: 69 bytes, params: 2, frame: 11
const binding = env0_0;
if (!binding.isModalOrActionsheetObstructing()) {
value = environment.__proto__.__proto__;
(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onTapMention(a0);
}
}
function MessagesHandlersHandleTapCommandMention(a0) { // fn#86780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:3655, owner: MessagesHandlers.handleTapCommandMention, offset: 0x01f9ffc2, size: 203 bytes, params: 2, frame: 19
var environment;
let value = environment.__proto__.__proto__;
value = undefined;
const nativeSyntheticEventData = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const channelId = nativeSyntheticEventData.channelId;
const commandName = nativeSyntheticEventData.commandName;
const commandName2 = commandName;
const commandId = nativeSyntheticEventData.commandId;
const binding = commandName2;
const getParams = binding.getParams;
const chatInputRef = Reflect.apply(getParams, binding, []).chatInputRef;
const handleTapCommandMention = MarkupReactCommandRuleModule.handleTapCommandMention;
const object = {channelId: channelId};
const current = chatInputRef.current;
object.currentText = (current == null ? value : current.getText()) ?? '';
object.commandId = commandId;
object.commandName = commandName;
object.onOpenCustomKeyboard = onOpenCustomKeyboard;
object.onSetCommand = onSetCommand;
Reflect.apply(handleTapCommandMention, MarkupReactCommandRuleModule, [object]);
return value;
function onOpenCustomKeyboard(a0) { // fn#86781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:3944, owner: MessagesHandlers.handleTapCommandMention.onOpenCustomKeyboard, offset: 0x01fa008d, size: 39 bytes, params: 2, frame: 12
return chatInputRef.current?.openCustomKeyboard(a0);
}
function onSetCommand() { // fn#86782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:4026, owner: MessagesHandlers.handleTapCommandMention.onSetCommand, offset: 0x01fa00b4, size: 173 bytes, params: 1, frame: 18
var r3;
var r5;
var applicationCommandManager;
(ActionSheetActionCreators).hideActionSheet();
(NavigateToLastChannel)();
let current = chatInputRef.current;
if (current != null) {
current.openSystemKeyboard();
}
current = chatInputRef.current;
const value3 = current == null;
if (value3) {
r3 = value3;
r5 = current;
} else {
applicationCommandManager = current.getApplicationCommandManager();
r3 = applicationCommandManager == null;
r5 = applicationCommandManager;
}
if (!r3) {
r5.setPartialCommand(commandId, commandName,
(require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations.MENTION);
}
}
}
function MessagesHandlersHandleLongPressCommandMention({nativeEvent}) { // fn#86783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:4302, owner: MessagesHandlers.handleLongPressCommandMention, offset: 0x01fa0161, size: 60 bytes, params: 2, frame: 14
const commandName = nativeEvent.commandName;
const commandId = nativeEvent.commandId;
const value = environment.__proto__.__proto__;
(MarkupReactCommandRuleModule).handleLongPressCommandMention(commandName,
commandId);
}
function handleTapGameMention(a0) { // fn#86784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:4419, owner: MessagesHandlers.handleTapGameMention, offset: 0x01fa019d, size: 116 bytes, params: 2, frame: 16
var environment;
var value;
const binding = nativeSyntheticEventData;
if (!binding.isModalOrActionsheetObstructing()) {
value = environment.__proto__.__proto__;
value = require(dependencyMap[44]);
var nativeSyntheticEventData = value.getNativeSyntheticEventData(a0);
value = require(dependencyMap[43]);
value = value(dependencyMap[58], dependencyMap.paths);
value.then(_fun86785);
}
function _fun86785({handleMessagesTapGameMention}) { // fn#86785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:4543, offset: 0x01fa0211, size: 38 bytes, params: 2, frame: 11
handleMessagesTapGameMention({gameId: env0_0.gameId});
}
}
function handleTapGuildEventLink({url, node}) { // fn#86786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:4635, owner: MessagesHandlers.handleTapGuildEventLink, offset: 0x01fa0237, size: 228 bytes, params: 2, frame: 15
var r4;
var r0;
var payload;
var inviteCode;
var inviteStoreBinding;
var getInvite;
var value2;
var value3;
var moduleValue2;
if (node != null) {
var value = environment.__proto__.__proto__;
var moduleValue = require(9875) /* metro dependency 9875: MarkupReactLinkUtils */;
if (moduleValue.isLinkTrusted(node)) {
payload = (importDefault(4093) /* metro dependency 4093: parseURL */)(url).payload;
if (payload.type !== LinkingTypes.INVITE) {
return false;
}
inviteCode = payload.inviteCode;
if (inviteCode == null) {
return false;
}
inviteStoreBinding = InviteStore;
getInvite = inviteStoreBinding.getInvite;
inviteCode = payload.inviteCode;
value2 = Reflect.apply(getInvite, inviteStoreBinding, [inviteCode]);
value3 = value2 == null;
if (value3) {
r4 = value3;
} else {
moduleValue2 = require(4116) /* metro dependency 4116: InviteTypeUtils */;
r4 = !moduleValue2.isGuildScheduledEventInviteEmbed(value2);
}
if (r4) {
r0 = !r4;
} else {
(importDefault(9876) /* metro dependency 9876: handleAcceptEventInstantInvite */)(value2);
r0 = true;
}
return r0;
}
}
return false;
}
function handleTapLink({nativeEvent}) { // fn#86787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:4926, owner: MessagesHandlers.handleTapLink, offset: 0x01fa031b, size: 109 bytes, params: 2, frame: 14
var environment;
const env0_1 = nativeEvent.getMessageData(nativeEvent.data.messageId);
let value = environment.__proto__.__proto__;
value = require(dependencyMap[43]);
value = value(dependencyMap[63], dependencyMap.paths);
value.then(_fun86788);
function _fun86788({handleMessagesTapLink}) { // fn#86788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:5024, offset: 0x01fa0388, size: 151 bytes, params: 2, frame: 16
const binding = env1_0;
handleMessagesTapLink({allowWithinModal: false, chatInputRef: binding.params.chatInputRef,
handleTransitionToThread: binding.handleTransitionToThread, message: env0_1?.message,
messageChannel: env0_1?.messageChannel, selectedChannelId: env1_0.params.selectedChannelId,
tapLinkData: nativeEvent});
}
}
function handleLongPressLink(a0) { // fn#86789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:5343, owner: MessagesHandlers.handleLongPressLink, offset: 0x01fa041f, size: 69 bytes, params: 2, frame: 11
const binding = env0_0;
if (!binding.isModalOrActionsheetObstructing()) {
value = environment.__proto__.__proto__;
(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onLongPressLink(a0);
}
}
function handleTapReaction(a0) { // fn#86790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:5455, owner: MessagesHandlers.handleTapReaction, offset: 0x01fa0464, size: 203 bytes, params: 2, frame: 23
var r5;
var messageData;
var value5;
var messageChannel;
var handleAddOrRemoveReaction;
var object;
let value = environment.__proto__.__proto__;
const {reaction, messageId,
isBurst} = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const binding = env0_0;
if (!binding.isModalOrActionsheetObstructing()) {
messageData = env0_0.getMessageData(messageId);
value5 = null;
if (value5 != messageData) {
messageChannel = messageData.messageChannel;
value = require(9835) /* metro dependency 9835: MessagesUtils */;
handleAddOrRemoveReaction = value.handleAddOrRemoveReaction;
if (value5 != reaction) {
object = {};
copyDataProperties(object, reaction, undefined);
object['emoji'] = reaction.emoji;
r5 = object;
} else {
r5 = value5;
}
Reflect.apply(handleAddOrRemoveReaction, value, [messageId, messageChannel, r5, isBurst,
a0.nativeEvent.location]);
}
}
}
function handleTapReactionOverflow(a0) { // fn#86791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:5785, owner: MessagesHandlers.handleTapReactionOverflow, offset: 0x01fa052f, size: 148 bytes, params: 2, frame: 15
const {messageId,
channelId} = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const binding = env0_0;
if (!binding.isModalOrActionsheetObstructing()) {
(require(9837) /* metro dependency 9837: ReactionUtils */).handleViewReactions({messageId: messageId,
channelId: channelId, location: {object: AnalyticsObjects.CHANNEL,
objectType: AnalyticsObjectTypes.REACTION_OVERFLOW}});
}
}
function handleLongPressReaction(a0) { // fn#86792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:6048, owner: MessagesHandlers.handleLongPressReaction, offset: 0x01fa05c3, size: 185 bytes, params: 2, frame: 17
var moduleValue2;
var value4;
const {reaction, messageId, channelId,
isBurst} = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const binding = env0_0;
if (!binding.isModalOrActionsheetObstructing()) {
moduleValue2 = require(9837) /* metro dependency 9837: ReactionUtils */;
value4 = null;
moduleValue2.handleViewReactions({messageId: messageId, channelId: channelId,
emoji: value4 != reaction ? reaction.emoji : value4, isSelectedBurst: isBurst,
location: {object: AnalyticsObjects.CHANNEL, objectType: AnalyticsObjectTypes.REACTION}});
}
}
function handleOpenSticker(a0) { // fn#86793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:6366, owner: MessagesHandlers.handleOpenSticker, offset: 0x01fa067c, size: 145 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__;
const nativeSyntheticEventData = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const sticker = nativeSyntheticEventData.sticker;
const messageData = env0_0.getMessageData(nativeSyntheticEventData.messageId);
if (messageData != null) {
(require(11065) /* metro dependency 11065: showStickerDetailActionSheet */).showStickerDetailActionSheet({renderableSticker: sticker,
channel: messageData.messageChannel, chatInputRef: env0_0.params.chatInputRef});
}
}
function handleTapAvatar(a0) { // fn#86794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:6622, owner: MessagesHandlers.handleTapAvatar, offset: 0x01fa070d, size: 63 bytes, params: 2, frame: 14
const binding = env0_0;
const handleOpenProfile = binding.handleOpenProfile;
const AVATAR = (AnalyticsLocation).AVATAR;
Reflect.apply(handleOpenProfile, binding, [a0, [AVATAR]]);
}
function handleTapUsername(a0) { // fn#86795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:6694, owner: MessagesHandlers.handleTapUsername, offset: 0x01fa074c, size: 468 bytes, params: 2, frame: 23
var nativeSyntheticEventData;
var userId;
var messageId;
var binding;
var messageData;
var message;
var user;
var chatInputRef;
var messageChannel;
var isPrivate2;
var permissionStoreBinding;
var value6;
var isReadOnlyThread;
var current;
var insertText;
let value = environment.__proto__.__proto__;
if (PlatformUtilsModule.isIOS()) {
binding = env0_0;
binding.handleOpenProfile(a0, [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USERNAME]);
} else {
nativeSyntheticEventData = (require(9834) /* metro dependency 9834: MessageDataSnowflakeUtils */).getNativeSyntheticEventData(a0);
userId = nativeSyntheticEventData.userId;
messageId = nativeSyntheticEventData.messageId;
binding = env0_0;
messageData = binding.getMessageData(messageId);
if (messageData != null) {
message = messageData.message;
if ((importDefault(8296) /* metro dependency 8296: isCrosspost */)(message)) {
if (message.messageReference.guild_id != null) {
binding = env0_0;
binding.handleOpenProfile(a0,
[(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USERNAME]);
} else if (userId != null) {
user = UserStore.getUser(userId);
binding = env0_0;
chatInputRef = binding.getParams().chatInputRef;
messageChannel = messageData.messageChannel;
isPrivate2 = messageChannel.isPrivate();
permissionStoreBinding = PermissionStore;
value6 = permissionStoreBinding.can(Permissions.SEND_MESSAGES, messageChannel);
isReadOnlyThread = (require(6860) /* metro dependency 6860: ThreadHooks */).computeIsReadOnlyThread(messageChannel);
if (user !== undefined) {
if (isPrivate2) {
if (!isReadOnlyThread) {
current = chatInputRef.current;
if (current != null) {
insertText = current.insertText;
value = require(11017) /* metro dependency 11017: AutocompleteUtils */;
value = value.getMentionTextWithUser(messageChannel, user);
Reflect.apply(insertText, current, [value, null, true]);
}
}
} else if (value6) {
if (!isReadOnlyThread) {
current = chatInputRef.current;
if (current != null) {
insertText = current.insertText;
value = require(11017) /* metro dependency 11017: AutocompleteUtils */;
value = value.getMentionTextWithUser(messageChannel, user);
Reflect.apply(insertText, current, [value, null, true]);
}
}
}
}
}
} else if (userId != null) {
user = UserStore.getUser(userId);
binding = env0_0;
chatInputRef = binding.getParams().chatInputRef;
messageChannel = messageData.messageChannel;
isPrivate2 = messageChannel.isPrivate();
permissionStoreBinding = PermissionStore;
value6 = permissionStoreBinding.can(Permissions.SEND_MESSAGES, messageChannel);
isReadOnlyThread = (require(6860) /* metro dependency 6860: ThreadHooks */).computeIsReadOnlyThread(messageChannel);
if (user !== undefined) {
if (isPrivate2) {
if (!isReadOnlyThread) {
current = chatInputRef.current;
if (current != null) {
insertText = current.insertText;
value = require(11017) /* metro dependency 11017: AutocompleteUtils */;
value = value.getMentionTextWithUser(messageChannel, user);
Reflect.apply(insertText, current, [value, null, true]);
}
}
} else if (value6) {
if (!isReadOnlyThread) {
current = chatInputRef.current;
if (current != null) {
insertText = current.insertText;
value = require(11017) /* metro dependency 11017: AutocompleteUtils */;
value = value.getMentionTextWithUser(messageChannel, user);
Reflect.apply(insertText, current, [value, null, true]);
}
}
}
}
}
}
}
}
function handleLongPressUsername(a0) { // fn#86796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:7299, owner: MessagesHandlers.handleLongPressUsername, offset: 0x01fa0920, size: 63 bytes, params: 2, frame: 14
const binding = env0_0;
const handleOpenProfile = binding.handleOpenProfile;
const USERNAME = (AnalyticsLocation).USERNAME;
Reflect.apply(handleOpenProfile, binding, [a0, [USERNAME]]);
}
function handleOpenProfile(a0, a1) { // fn#86797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:7373, owner: MessagesHandlers.handleOpenProfile, offset: 0x01fa095f, size: 746 bytes, params: 3, frame: 22
var r3;
var r9;
var r8;
var id;
var messageReference;
var guild_id;
var messageByReference;
var defaultImport;
var object;
var defaultImport2;
var openLazy;
var defaultImport3;
var defaultImport4;
let value = environment.__proto__.__proto__;
const value2 = undefined;
const {messageId, userId} = require(dependencyMap[44]).getNativeSyntheticEventData(a0);
const messageData = env0_0.getMessageData(messageId);
if (messageData != null) {
var messageChannel = messageData.messageChannel;
var message = messageData.message;
r3 = userId != null ? UserStore.getUser(userId) : value2;
if (messageId == null) {
r8 = r3;
if (r8 != null) {
value = importDefault(dependencyMap[74]);
object = {};
id = r8.id;
object.userId = id;
id = messageChannel.id;
object.channelId = id;
object.messageId = messageId;
object.sourceAnalyticsLocations = a1;
value(object);
}
return value2;
}
var moduleValue2 = require(dependencyMap[71]);
if (moduleValue2.isPublicSystemMessage(message)) {
defaultImport4 = importDefault(dependencyMap[55]);
openLazy = defaultImport4.openLazy;
value = require(dependencyMap[43]);
value = value(dependencyMap[72], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport4, [value, 'PublicGuildAnnouncementProfile']);
return value2;
}
r9 = r3 ?? UserStore.getUser(message.author.id);
if (importDefault(dependencyMap[68])(message)) {
messageReference = message.messageReference;
guild_id = messageReference.guild_id;
if (guild_id != null) {
defaultImport3 = importDefault(dependencyMap[55]);
openLazy = defaultImport3.openLazy;
value = require(dependencyMap[43]);
value = value(dependencyMap[73], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport3, [value, 'GuildProfileActionSheet:' + guild_id,
{guildId: guild_id}]);
return value2;
}
if (message.type !== MessageTypes.THREAD_STARTER_MESSAGE) {
r8 = r9;
if (r8 != null) {
value = importDefault(dependencyMap[74]);
object = {};
id = r8.id;
object.userId = id;
id = messageChannel.id;
object.channelId = id;
object.messageId = messageId;
object.sourceAnalyticsLocations = a1;
value(object);
}
return value2;
}
messageReference = message.messageReference;
if (messageReference == null) {
r8 = r9;
if (r8 != null) {
value = importDefault(dependencyMap[74]);
object = {};
id = r8.id;
object.userId = id;
id = messageChannel.id;
object.channelId = id;
object.messageId = messageId;
object.sourceAnalyticsLocations = a1;
value(object);
}
return value2;
}
messageReference = message.messageReference;
messageByReference = ReferencedMessageStore.getMessageByReference(messageReference);
if (messageByReference == null) {
r8 = r9;
if (r8 != null) {
value = importDefault(dependencyMap[74]);
object = {};
id = r8.id;
object.userId = id;
id = messageChannel.id;
object.channelId = id;
object.messageId = messageId;
object.sourceAnalyticsLocations = a1;
value(object);
}
return value2;
}
message = messageByReference.message;
if (message == null) {
r8 = r9;
if (r8 != null) {
value = importDefault(dependencyMap[74]);
object = {};
id = r8.id;
object.userId = id;
id = messageChannel.id;
object.channelId = id;
object.messageId = messageId;
object.sourceAnalyticsLocations = a1;
value(object);
}
return value2;
}
defaultImport = importDefault(dependencyMap[68]);
message = messageByReference.message;
if (defaultImport(message)) {
message = messageByReference.message;
messageReference = message.messageReference;
if (messageReference == null) {
r8 = r9;
if (r8 != null) {
value = importDefault(dependencyMap[74]);
object = {};
id = r8.id;
object.userId = id;
id = messageChannel.id;
object.channelId = id;
object.messageId = messageId;
object.sourceAnalyticsLocations = a1;
value(object);
}
return value2;
}
message = messageByReference.message;
messageReference = message.messageReference;
guild_id = messageReference.guild_id;
if (guild_id != null) {
guild_id = messageByReference.message.messageReference.guild_id;
defaultImport2 = importDefault(dependencyMap[55]);
openLazy = defaultImport2.openLazy;
value = require(dependencyMap[43]);
value = value(dependencyMap[73], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport2, [value, 'GuildProfileActionSheet:' + guild_id,
{guildId: guild_id}]);
return value2;
}
r8 = r9;
if (r8 != null) {
value = importDefault(dependencyMap[74]);
object = {};
id = r8.id;
object.userId = id;
id = messageChannel.id;
object.channelId = id;
object.messageId = messageId;
object.sourceAnalyticsLocations = a1;
value(object);
}
return value2;
}
r8 = r9;
if (r8 != null) {
value = importDefault(dependencyMap[74]);
object = {};
id = r8.id;
object.userId = id;
id = messageChannel.id;
object.channelId = id;
object.messageId = messageId;
object.sourceAnalyticsLocations = a1;
value(object);
}
return value2;
}
if (message.type !== MessageTypes.THREAD_STARTER_MESSAGE) {
r8 = r9;
if (r8 != null) {
value = importDefault(dependencyMap[74]);
object = {};
id = r8.id;
object.userId = id;
id = messageChannel.id;
object.channelId = id;
object.messageId = messageId;
object.sourceAnalyticsLocations = a1;
value(object);
}
return value2;
}
if (message.messageReference == null) {
r8 = r9;
if (r8 != null) {
value = importDefault(dependencyMap[74]);
object = {};
id = r8.id;
object.userId = id;
id = messageChannel.id;
object.channelId = id;
object.messageId = messageId;
object.sourceAnalyticsLocations = a1;
value(object);
}
return value2;
}
messageByReference = ReferencedMessageStore.getMessageByReference(message.messageReference);
if (messageByReference == null) {
r8 = r9;
if (r8 != null) {
value = importDefault(dependencyMap[74]);
object = {};
id = r8.id;
object.userId = id;
id = messageChannel.id;
object.channelId = id;
object.messageId = messageId;
object.sourceAnalyticsLocations = a1;
value(object);
}
return value2;
}
if (messageByReference.message == null) {
r8 = r9;
if (r8 != null) {
value = importDefault(dependencyMap[74]);
object = {};
id = r8.id;
object.userId = id;
id = messageChannel.id;
object.channelId = id;
object.messageId = messageId;
object.sourceAnalyticsLocations = a1;
value(object);
}
return value2;
}
defaultImport = importDefault(dependencyMap[68]);
message = messageByReference.message;
if (defaultImport(message)) {
message = messageByReference.message;
messageReference = message.messageReference;
if (messageReference == null) {
r8 = r9;
if (r8 != null) {
value = importDefault(dependencyMap[74]);
object = {};
id = r8.id;
object.userId = id;
id = messageChannel.id;
object.channelId = id;
object.messageId = messageId;
object.sourceAnalyticsLocations = a1;
value(object);
}
return value2;
}
message = messageByReference.message;
messageReference = message.messageReference;
guild_id = messageReference.guild_id;
if (guild_id != null) {
guild_id = messageByReference.message.messageReference.guild_id;
defaultImport2 = importDefault(dependencyMap[55]);
openLazy = defaultImport2.openLazy;
value = require(dependencyMap[43]);
value = value(dependencyMap[73], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport2, [value, 'GuildProfileActionSheet:' + guild_id,
{guildId: guild_id}]);
return value2;
}
r8 = r9;
if (r8 != null) {
value = importDefault(dependencyMap[74]);
object = {};
id = r8.id;
object.userId = id;
id = messageChannel.id;
object.channelId = id;
object.messageId = messageId;
object.sourceAnalyticsLocations = a1;
value(object);
}
return value2;
}
r8 = r9;
if (r8 != null) {
value = importDefault(dependencyMap[74]);
object = {};
id = r8.id;
object.userId = id;
id = messageChannel.id;
object.channelId = id;
object.messageId = messageId;
object.sourceAnalyticsLocations = a1;
value(object);
}
}
return value2;
}
function handleTapThreadEmbed(a0) { // fn#86798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:8387, owner: MessagesHandlers.handleTapThreadEmbed, offset: 0x01fa0c49, size: 194 bytes, params: 2, frame: 19
var guildId;
var current;
const getNativeSyntheticEventData = MessageDataSnowflakeUtilsModule.getNativeSyntheticEventData;
const messageId = Reflect.apply(getNativeSyntheticEventData, MessageDataSnowflakeUtilsModule, [a0]).messageId;
let binding = env0_0;
const messageData = binding.getMessageData(messageId);
if (messageData != null) {
guildId = messageData.messageChannel.getGuildId();
if (messageId != null) {
if (guildId != null) {
binding = env0_0;
current = binding.getParams().chatInputRef.current;
if (current != null) {
current.blur();
}
binding = env0_0;
binding.handleTransitionToThread(guildId,
(importDefault(21) /* metro dependency 21: SnowflakeUtils */).castMessageIdAsChannelId(messageId),
OpenThreadAnalyticsLocations.EMBED);
}
}
}
}
function handleTapReply({nativeEvent}) { // fn#86799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:8701, owner: MessagesHandlers.handleTapReply, offset: 0x01fa0d0b, size: 180 bytes, params: 2, frame: 20
var r4;
var message_id;
var messageChannel;
var message;
var value6;
var referencedMessageStoreBinding;
const originId = nativeEvent.originId;
let binding = env0_0;
const messageData = binding.getMessageData(originId);
if (messageData != null) {
messageChannel = messageData.messageChannel;
message = messageData.message;
r4 = messageChannel.getGuildId() ?? ME;
message_id = message.messageReference?.message_id;
if (message_id != null) {
value6 = environment.__proto__.__proto__;
referencedMessageStoreBinding = ReferencedMessageStore;
(importDefault(11398) /* metro dependency 11398: trackRepliedMessageClicked */)(message,
referencedMessageStoreBinding.getMessageByReference(message.messageReference), messageChannel);
binding = env0_0;
binding.handleTransitionToMessage(r4, messageChannel.id, message_id);
}
}
}
function handleTapSummary(a0) { // fn#86800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:9037, owner: MessagesHandlers.handleTapSummary, offset: 0x01fa0dbf, size: 181 bytes, params: 2, frame: 17
var summary;
var defaultImport;
var openLazy;
let value = environment.__proto__.__proto__;
const nativeSyntheticEventData = require(dependencyMap[44]).getNativeSyntheticEventData(a0);
if (env0_0.getMessageData(nativeSyntheticEventData.messageId) != null) {
summary = SummaryStore.findSummary(nativeSyntheticEventData.channelId, nativeSyntheticEventData.summaryId);
if (summary != null) {
defaultImport = importDefault(dependencyMap[55]);
openLazy = defaultImport.openLazy;
value = require(dependencyMap[43]);
value = value(dependencyMap[77], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'SummaryActionSheet', {summary: summary}]);
}
}
}
function handleTapSummaryJump(a0) { // fn#86801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:9300, owner: MessagesHandlers.handleTapSummaryJump, offset: 0x01fa0e74, size: 169 bytes, params: 2, frame: 19
var r8;
var messageChannel;
var message;
const value = environment.__proto__.__proto__;
const {messageId, channelId,
summaryId} = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
let binding = env0_0;
const messageData = binding.getMessageData(messageId);
if (messageData != null) {
messageChannel = messageData.messageChannel;
message = messageData.message;
r8 = messageChannel.getGuildId() ?? ME;
binding = env0_0;
binding.handleTransitionToMessage(r8, messageChannel.id, message.id);
(importDefault(9864) /* metro dependency 9864: SummaryActionCreators */).setSelectedSummary(channelId,
summaryId);
}
}
function handleLongPressMessage(a0) { // fn#86802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:9605, owner: MessagesHandlers.handleLongPressMessage, offset: 0x01fa0f1d, size: 427 bytes, params: 2, frame: 29
var messageChannel;
var message;
var userStoreBinding;
var value6;
var uploadStoreBinding;
var moduleValue2;
var getLongPressSelectedMedia;
var moduleValue3;
var value7;
var moduleValue4;
var showLongPressMessageActionSheet;
var object;
const value2 = undefined;
const {messageId, mediaIndex, mediaType, componentId,
componentMediaIndex} = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
let binding = env0_0;
const messageData = binding.getMessageData(messageId);
if (messageData != null) {
messageChannel = messageData.messageChannel;
message = messageData.message;
binding = env0_0;
if (!binding.isModalOrActionsheetObstructing()) {
userStoreBinding = UserStore;
value6 = userStoreBinding.getUser(message.author.id);
if (value6 != null) {
uploadStoreBinding = UploadStore;
if (uploadStoreBinding.getUploaderFileForMessageId(messageId) == null) {
moduleValue2 = require(9835) /* metro dependency 9835: MessagesUtils */;
getLongPressSelectedMedia = moduleValue2.getLongPressSelectedMedia;
moduleValue3 = require(4633) /* metro dependency 4633: InteractionComponentTypes */;
value7 = Reflect.apply(getLongPressSelectedMedia, moduleValue2, [message, mediaIndex, mediaType,
moduleValue3.asComponentId(componentId), componentMediaIndex]);
moduleValue4 = require(11401) /* metro dependency 11401: showLongPressMessageActionSheet */;
showLongPressMessageActionSheet = moduleValue4.showLongPressMessageActionSheet;
object = {};
object.analyticsLocation = {section: AnalyticsSections.CHANNEL, object: AnalyticsObjects.MESSAGE};
object.canAddNewReactions = (importDefault(11419) /* metro dependency 11419: canAddNewReactions */)(messageChannel);
object.channel = messageChannel;
object.chatInputRef = env0_0.params.chatInputRef;
object.message = message;
object.selectedMedia = value7 ?? value2;
object.user = value6;
Reflect.apply(showLongPressMessageActionSheet, moduleValue4, [object]);
} else if (message.state === MessageStates.SEND_FAILED) {
moduleValue2 = require(9835) /* metro dependency 9835: MessagesUtils */;
getLongPressSelectedMedia = moduleValue2.getLongPressSelectedMedia;
moduleValue3 = require(4633) /* metro dependency 4633: InteractionComponentTypes */;
value7 = Reflect.apply(getLongPressSelectedMedia, moduleValue2, [message, mediaIndex, mediaType,
moduleValue3.asComponentId(componentId), componentMediaIndex]);
moduleValue4 = require(11401) /* metro dependency 11401: showLongPressMessageActionSheet */;
showLongPressMessageActionSheet = moduleValue4.showLongPressMessageActionSheet;
object = {};
object.analyticsLocation = {section: AnalyticsSections.CHANNEL, object: AnalyticsObjects.MESSAGE};
object.canAddNewReactions = (importDefault(11419) /* metro dependency 11419: canAddNewReactions */)(messageChannel);
object.channel = messageChannel;
object.chatInputRef = env0_0.params.chatInputRef;
object.message = message;
object.selectedMedia = value7 ?? value2;
object.user = value6;
Reflect.apply(showLongPressMessageActionSheet, moduleValue4, [object]);
}
} else if (message.state === MessageStates.SEND_FAILED) {
uploadStoreBinding = UploadStore;
if (uploadStoreBinding.getUploaderFileForMessageId(messageId) == null) {
moduleValue2 = require(9835) /* metro dependency 9835: MessagesUtils */;
getLongPressSelectedMedia = moduleValue2.getLongPressSelectedMedia;
moduleValue3 = require(4633) /* metro dependency 4633: InteractionComponentTypes */;
value7 = Reflect.apply(getLongPressSelectedMedia, moduleValue2, [message, mediaIndex, mediaType,
moduleValue3.asComponentId(componentId), componentMediaIndex]);
moduleValue4 = require(11401) /* metro dependency 11401: showLongPressMessageActionSheet */;
showLongPressMessageActionSheet = moduleValue4.showLongPressMessageActionSheet;
object = {};
object.analyticsLocation = {section: AnalyticsSections.CHANNEL, object: AnalyticsObjects.MESSAGE};
object.canAddNewReactions = (importDefault(11419) /* metro dependency 11419: canAddNewReactions */)(messageChannel);
object.channel = messageChannel;
object.chatInputRef = env0_0.params.chatInputRef;
object.message = message;
object.selectedMedia = value7 ?? value2;
object.user = value6;
Reflect.apply(showLongPressMessageActionSheet, moduleValue4, [object]);
} else if (message.state === MessageStates.SEND_FAILED) {
moduleValue2 = require(9835) /* metro dependency 9835: MessagesUtils */;
getLongPressSelectedMedia = moduleValue2.getLongPressSelectedMedia;
moduleValue3 = require(4633) /* metro dependency 4633: InteractionComponentTypes */;
value7 = Reflect.apply(getLongPressSelectedMedia, moduleValue2, [message, mediaIndex, mediaType,
moduleValue3.asComponentId(componentId), componentMediaIndex]);
moduleValue4 = require(11401) /* metro dependency 11401: showLongPressMessageActionSheet */;
showLongPressMessageActionSheet = moduleValue4.showLongPressMessageActionSheet;
object = {};
object.analyticsLocation = {section: AnalyticsSections.CHANNEL, object: AnalyticsObjects.MESSAGE};
object.canAddNewReactions = (importDefault(11419) /* metro dependency 11419: canAddNewReactions */)(messageChannel);
object.channel = messageChannel;
object.chatInputRef = env0_0.params.chatInputRef;
object.message = message;
object.selectedMedia = value7 ?? value2;
object.user = value6;
Reflect.apply(showLongPressMessageActionSheet, moduleValue4, [object]);
}
}
}
}
return value2;
}
function handleInitiateReply(a0) { // fn#86803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:10321, owner: MessagesHandlers.handleInitiateReply, offset: 0x01fa10c8, size: 243 bytes, params: 2, frame: 20
var messageChannel;
var message;
var nativeEvent;
var moduleValue2;
const binding = env0_0;
const chatInputRef = binding.params.chatInputRef;
let value = environment.__proto__.__proto__;
const getNativeSyntheticEventData = MessageDataSnowflakeUtilsModule.getNativeSyntheticEventData;
const messageData = binding.getMessageData(Reflect.apply(getNativeSyntheticEventData,
MessageDataSnowflakeUtilsModule, [a0]).messageId);
if (messageData != null) {
messageChannel = messageData.messageChannel;
message = messageData.message;
nativeEvent = a0.nativeEvent;
if (nativeEvent.triggerHaptic) {
moduleValue2 = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue2.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
}
value = importDefault(11172) /* metro dependency 11172: replyToMessage */;
nativeEvent = a0.nativeEvent;
value({message: message, channel: messageChannel, chatInputRef: chatInputRef,
actionSource: nativeEvent.location ?? 'message_swipe', invertible: true});
}
}
function handleInitiateThread(a0) { // fn#86804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:10718, owner: MessagesHandlers.handleInitiateThread, offset: 0x01fa11bb, size: 263 bytes, params: 2, frame: 19
var messageChannel;
var message;
var moduleValue2;
var moduleValue3;
var transitionToGuild;
var guild_id;
let value = environment.__proto__.__proto__;
const getNativeSyntheticEventData = MessageDataSnowflakeUtilsModule.getNativeSyntheticEventData;
const messageData = env0_0.getMessageData(Reflect.apply(getNativeSyntheticEventData,
MessageDataSnowflakeUtilsModule, [a0]).messageId);
if (messageData != null) {
messageChannel = messageData.messageChannel;
message = messageData.message;
moduleValue2 = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue2.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
if (message.hasFlag(MessageFlags.HAS_THREAD)) {
moduleValue3 = require(1230) /* metro dependency 1230: router_utils */;
transitionToGuild = moduleValue3.transitionToGuild;
guild_id = messageChannel.guild_id;
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
Reflect.apply(transitionToGuild, moduleValue3, [guild_id, value.castMessageIdAsChannelId(message.id)]);
} else {
(require(11005) /* metro dependency 11005: LongPressMessageActionSheetUtils */).handleCreateThread(messageChannel,
message, 'Message Shortcut');
}
}
}
function handleInitiateEdit(a0) { // fn#86805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:11086, owner: MessagesHandlers.handleInitiateEdit, offset: 0x01fa12c2, size: 199 bytes, params: 2, frame: 22
var messageChannel;
var message;
var currentUser;
const binding = env0_0;
const chatInputRef = binding.params.chatInputRef;
const value = environment.__proto__.__proto__;
const value2 = undefined;
const getNativeSyntheticEventData = MessageDataSnowflakeUtilsModule.getNativeSyntheticEventData;
const messageData = binding.getMessageData(Reflect.apply(getNativeSyntheticEventData,
MessageDataSnowflakeUtilsModule, [a0]).messageId);
if (messageData != null) {
messageChannel = messageData.messageChannel;
message = messageData.message;
currentUser = UserStore.getCurrentUser();
if ((importDefault(5260) /* metro dependency 5260: canEditMessage */)(message,
currentUser == null ? value2 : currentUser.id)) {
(require(11005) /* metro dependency 11005: LongPressMessageActionSheetUtils */).handleEdit(message,
messageChannel,
chatInputRef, 'message_swipe', true);
}
}
return value2;
}
function handleTapMessage(a0) { // fn#86806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:11369, owner: MessagesHandlers.handleTapMessage, offset: 0x01fa1389, size: 432 bytes, params: 2, frame: 19
var messageChannel;
var message;
var guildId;
var type;
var moduleValue2;
var embedChannel;
var flaggedMessageId;
var defaultImport;
let value = environment.__proto__.__proto__;
const value2 = undefined;
const getNativeSyntheticEventData = MessageDataSnowflakeUtilsModule.getNativeSyntheticEventData;
const messageId = Reflect.apply(getNativeSyntheticEventData, MessageDataSnowflakeUtilsModule, [a0]).messageId;
let binding = env0_0;
const messageData = binding.getMessageData(messageId);
if (messageData != null) {
messageChannel = messageData.messageChannel;
message = messageData.message;
guildId = messageChannel.getGuildId();
if (message != null) {
if (guildId != null) {
type = message.type;
if (MessageTypes.GUILD_BOOST === type) {
(importAll(6522) /* metro dependency 6522: BoostingActionCreators */).openApplyBoostModal(guildId);
defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
defaultImport.trackWithMetadata(AnalyticEvents.PREMIUM_GUILD_PROMOTION_OPENED,
{location: {section: AnalyticsSections.CHANNEL_TEXT_AREA,
object: AnalyticsObjects.BOOST_ANNOUNCEMENT_UPSELL}});
} else if (MessageTypes.GUILD_BOOST_TIER_1 === type) {
(importAll(6522) /* metro dependency 6522: BoostingActionCreators */).openApplyBoostModal(guildId);
defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
defaultImport.trackWithMetadata(AnalyticEvents.PREMIUM_GUILD_PROMOTION_OPENED,
{location: {section: AnalyticsSections.CHANNEL_TEXT_AREA,
object: AnalyticsObjects.BOOST_ANNOUNCEMENT_UPSELL}});
} else if (MessageTypes.GUILD_BOOST_TIER_2 === type) {
(importAll(6522) /* metro dependency 6522: BoostingActionCreators */).openApplyBoostModal(guildId);
defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
defaultImport.trackWithMetadata(AnalyticEvents.PREMIUM_GUILD_PROMOTION_OPENED,
{location: {section: AnalyticsSections.CHANNEL_TEXT_AREA,
object: AnalyticsObjects.BOOST_ANNOUNCEMENT_UPSELL}});
} else if (MessageTypes.GUILD_BOOST_TIER_3 === type) {
(importAll(6522) /* metro dependency 6522: BoostingActionCreators */).openApplyBoostModal(guildId);
defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
defaultImport.trackWithMetadata(AnalyticEvents.PREMIUM_GUILD_PROMOTION_OPENED,
{location: {section: AnalyticsSections.CHANNEL_TEXT_AREA,
object: AnalyticsObjects.BOOST_ANNOUNCEMENT_UPSELL}});
} else if (MessageTypes.AUTO_MODERATION_ACTION === type) {
moduleValue2 = require(5051) /* metro dependency 5051: AutomodMessageUtils */;
if (moduleValue2.isAutomodMessageRecord(message)) {
value = require(5051) /* metro dependency 5051: AutomodMessageUtils */;
value = value.extractAutomodMessageFields(message);
embedChannel = value.embedChannel;
flaggedMessageId = value.flaggedMessageId;
value = flaggedMessageId != null;
if (value && embedChannel != null) {
binding = env0_0;
binding.handleTransitionToMessage(guildId, embedChannel == null ? value2 : embedChannel.id,
flaggedMessageId);
}
}
}
}
}
}
return value2;
}
function handleDoubleTapMessage(a0) { // fn#86807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:12090, owner: MessagesHandlers.handleDoubleTapMessage, offset: 0x01fa1539, size: 113 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__;
const getNativeSyntheticEventData = MessageDataSnowflakeUtilsModule.getNativeSyntheticEventData;
const messageData = env0_0.getMessageData(Reflect.apply(getNativeSyntheticEventData,
MessageDataSnowflakeUtilsModule, [a0]).messageId);
if (messageData != null) {
(require(8217) /* metro dependency 8217: DoubleTapToReactUtils */).handleAddDefaultDoubleTapReaction(messageData.message,
messageData.messageChannel);
}
}
function handleTapSeparator({nativeEvent}) { // fn#86808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:12296, owner: MessagesHandlers.handleTapSeparator, offset: 0x01fa15aa, size: 161 bytes, params: 2, frame: 13
var type;
var value2;
let binding = env0_0;
if (!binding.isModalOrActionsheetObstructing()) {
type = nativeEvent.type;
value2 = environment.__proto__.__proto__;
if (SeparatorAction.LOAD_MORE_BEFORE === type) {
env0_0.params.loadMoreBefore();
} else if (SeparatorAction.LOAD_MORE_AFTER === type) {
env0_0.params.loadMoreAfter();
} else if (SeparatorAction.TOGGLE_BLOCKED_MESSAGES === type) {
if (nativeEvent.context != null) {
binding = env0_0;
binding.handleReveal(nativeEvent.context);
}
}
}
}
function handleTapCancelUploadItem({nativeEvent}) { // fn#86809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:12600, owner: MessagesHandlers.handleTapCancelUploadItem, offset: 0x01fa164b, size: 160 bytes, params: 2, frame: 17
var environment;
var value2;
var moduleValue;
const uploaderId = nativeEvent.uploaderId;
const itemId = nativeEvent.itemId;
var value;
const uploads = uploaderId.params.uploads;
if (uploads != null) {
value = uploads.find(function({id}) {
return id === uploaderId;
});
if (value != null) {
value2 = environment.__proto__.__proto__;
moduleValue = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
(importDefault(11420) /* metro dependency 11420: UploadActionCreators */).cancelUploadItem(value, itemId);
}
}
}
function handleTapSpotifyResource({author}) { // fn#86811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:12836, owner: MessagesHandlers.handleTapSpotifyResource, offset: 0x01fa16eb, size: 94 bytes, params: 2, frame: 14
var environment;
var value;
var presenceStoreBinding;
var activity;
if (author != null) {
if (author.id != null) {
value = environment.__proto__.__proto__;
presenceStoreBinding = PresenceStore;
activity = presenceStoreBinding.findActivity(author.id, function({type}) {
return type === ActivityTypes.LISTENING;
});
value = require(10216) /* metro dependency 10216: UserActivitySpotify */;
value.openTrack(activity);
}
}
}
function handleTapActivityResource(a0) { // fn#86813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:12987, owner: MessagesHandlers.handleTapActivityResource, offset: 0x01fa1764, size: 1147 bytes, params: 2, frame: 30
var r13;
var r6;
var r1;
var r11;
var r14;
var value5;
var defaultImport;
var defaultImport2;
var object;
var MESSAGE_EMBED;
var INVITE_EMBED;
var session_id;
var value6;
var moduleValue;
var moduleValue2;
var value7;
var moduleValue3;
var application2;
var moduleValue4;
var getCanJoin;
var value12;
var canJoin;
var remoteJoinPlatform;
var party;
var moduleValue5;
var moduleValue6;
var defaultImport4;
var join;
var defaultImport5;
let author = a0.author;
const activity = a0.activity;
const application = a0.application;
let value = null;
if (value != author) {
if (value == activity) {
return undefined;
}
if (value == application) {
return undefined;
}
var id = author.id;
if (value == id) {
return undefined;
}
var channel_id = a0.channel_id;
var channel = ChannelStore.getChannel(channel_id);
var id2 = application.id;
var deeplink_uri = application.deeplink_uri;
var presenceStoreBinding = PresenceStore;
var getApplicationActivity = presenceStoreBinding.getApplicationActivity;
id = author.id;
var value4 = Reflect.apply(getApplicationActivity, presenceStoreBinding, [id, id2]);
if (value != value4) {
session_id = value4.session_id;
if (value == session_id) {
return undefined;
}
value6 = undefined;
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isIOS()) {
r13 = ActivityGamePlatforms.IOS;
} else {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
r13 = moduleValue2.isAndroid() ? ActivityGamePlatforms.ANDROID : value6;
}
value7 = value != value4.flags;
if (value7) {
moduleValue3 = require(1391) /* metro dependency 1391: FlagUtils */;
r6 = moduleValue3.hasFlag(value4.flags, ActivityFlags.EMBEDDED);
} else {
r6 = value7;
}
r1 = value != r13 && (value == value4.supported_platforms ? value6 : value4.supported_platforms.includes(r13));
r11 = value != r1 && r1;
application2 = ApplicationStore.getApplication(id2);
r14 = value != application2 ? application2 : value;
if (value == r14) {
return value6;
}
moduleValue4 = require(10588) /* metro dependency 10588: getCanJoin */;
getCanJoin = moduleValue4.getCanJoin;
object = {presenceActivity: value4};
object.currentUserPresenceActivity = (importDefault(10259) /* metro dependency 10259: getCurrentUserPresenceActivity */)(LocalActivityStore,
SelfPresenceStore, id2);
object.currentUserId = AuthenticationStore.getId();
object.message = a0;
object.application = r14;
object.isEmbeddedApplication = r6;
object.isFrameApplication = false;
object.isGameLaunchable = r11;
value12 = Reflect.apply(getCanJoin, moduleValue4, [object]);
canJoin = value12.canJoin;
remoteJoinPlatform = value12.remoteJoinPlatform;
if (value != remoteJoinPlatform) {
party = value4.party;
r11 = value == party ? value6 : party.id;
} else {
r11 = value6;
}
if (canJoin) {
defaultImport4 = importDefault(10265) /* metro dependency 10265: GamesActionCreatorsNative */;
join = defaultImport4.join;
object = {};
id = author.id;
object.userId = id;
object.sessionId = session_id;
object.application = application;
object.channelId = channel_id;
id = a0.id;
object.messageId = id;
object.applicationActivity = value4;
object.remotePartyId = r11;
object.embedded = r6;
MESSAGE_EMBED = AnalyticsLocations.MESSAGE_EMBED;
object.source = MESSAGE_EMBED;
INVITE_EMBED = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INVITE_EMBED;
object.analyticsLocations = [INVITE_EMBED];
Reflect.apply(join, defaultImport4, [object]);
defaultImport5 = importDefault(10656) /* metro dependency 10656: trackApplicationOpen */;
object = {};
object.type = AnalyticsGameOpenTypes.JOIN;
MESSAGE_EMBED = AnalyticsLocations.MESSAGE_EMBED;
object.source = MESSAGE_EMBED;
author = a0.author;
id = author.id;
object.userId = id;
object.guildId = value == channel ? value6 : channel.guild_id;
object.channelId = channel_id;
object.applicationId = id2;
party = value4.party;
id = value == party ? value6 : party.id;
object.partyId = id;
id = a0.id;
object.messageId = id;
INVITE_EMBED = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INVITE_EMBED;
object.analyticsLocations = [INVITE_EMBED];
object.remoteJoinPlatform = remoteJoinPlatform;
defaultImport5(object);
return undefined;
}
moduleValue5 = require(10592) /* metro dependency 10592: getSupportsRemoteJoin */;
if (moduleValue5.getSupportsRemoteJoin(value4)) {
moduleValue6 = require(10593) /* metro dependency 10593: getShouldShowAppAuthPrompt */;
if (moduleValue6.getShouldShowAppAuthPrompt(r14)) {
value = require(11421) /* metro dependency 11421: startAuthorizationNoHook */;
value.startAuthorizationNoHook(r14,
[(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INVITE_EMBED]);
return value6;
}
defaultImport4 = importDefault(10265) /* metro dependency 10265: GamesActionCreatorsNative */;
join = defaultImport4.join;
object = {};
id = author.id;
object.userId = id;
object.sessionId = session_id;
object.application = application;
object.channelId = channel_id;
id = a0.id;
object.messageId = id;
object.applicationActivity = value4;
object.remotePartyId = r11;
object.embedded = r6;
MESSAGE_EMBED = AnalyticsLocations.MESSAGE_EMBED;
object.source = MESSAGE_EMBED;
INVITE_EMBED = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INVITE_EMBED;
object.analyticsLocations = [INVITE_EMBED];
Reflect.apply(join, defaultImport4, [object]);
defaultImport5 = importDefault(10656) /* metro dependency 10656: trackApplicationOpen */;
object = {};
object.type = AnalyticsGameOpenTypes.JOIN;
MESSAGE_EMBED = AnalyticsLocations.MESSAGE_EMBED;
object.source = MESSAGE_EMBED;
author = a0.author;
id = author.id;
object.userId = id;
object.guildId = value == channel ? value6 : channel.guild_id;
object.channelId = channel_id;
object.applicationId = id2;
party = value4.party;
id = value == party ? value6 : party.id;
object.partyId = id;
id = a0.id;
object.messageId = id;
INVITE_EMBED = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INVITE_EMBED;
object.analyticsLocations = [INVITE_EMBED];
object.remoteJoinPlatform = remoteJoinPlatform;
defaultImport5(object);
return undefined;
}
defaultImport4 = importDefault(10265) /* metro dependency 10265: GamesActionCreatorsNative */;
join = defaultImport4.join;
object = {};
id = author.id;
object.userId = id;
object.sessionId = session_id;
object.application = application;
object.channelId = channel_id;
id = a0.id;
object.messageId = id;
object.applicationActivity = value4;
object.remotePartyId = r11;
object.embedded = r6;
MESSAGE_EMBED = AnalyticsLocations.MESSAGE_EMBED;
object.source = MESSAGE_EMBED;
INVITE_EMBED = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INVITE_EMBED;
object.analyticsLocations = [INVITE_EMBED];
Reflect.apply(join, defaultImport4, [object]);
defaultImport5 = importDefault(10656) /* metro dependency 10656: trackApplicationOpen */;
object = {};
object.type = AnalyticsGameOpenTypes.JOIN;
MESSAGE_EMBED = AnalyticsLocations.MESSAGE_EMBED;
object.source = MESSAGE_EMBED;
author = a0.author;
id = author.id;
object.userId = id;
object.guildId = value == channel ? value6 : channel.guild_id;
object.channelId = channel_id;
object.applicationId = id2;
party = value4.party;
id = value == party ? value6 : party.id;
object.partyId = id;
id = a0.id;
object.messageId = id;
INVITE_EMBED = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INVITE_EMBED;
object.analyticsLocations = [INVITE_EMBED];
object.remoteJoinPlatform = remoteJoinPlatform;
defaultImport5(object);
return undefined;
}
if (value != deeplink_uri) {
value5 = undefined;
defaultImport = importDefault(3853) /* metro dependency 3853: Linking */;
defaultImport.openURL(deeplink_uri, WebBrowserType.SAFARI);
defaultImport2 = importDefault(10656) /* metro dependency 10656: trackApplicationOpen */;
object = {};
object.type = AnalyticsGameOpenTypes.PLAY;
object.source = AnalyticsLocations.MESSAGE_EMBED;
id = a0.author.id;
object.userId = id;
object.guildId = value == channel ? value5 : channel.guild_id;
object.channelId = channel_id;
id = application.id;
object.applicationId = id;
id = a0.id;
object.messageId = id;
object.analyticsLocations = [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INVITE_EMBED];
defaultImport2(object);
}
}
}
function handleTapStreamRequest(a0) { // fn#86814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:14641, owner: MessagesHandlers.handleTapStreamRequest, offset: 0x01fa1bdf, size: 170 bytes, params: 2, frame: 16
var channelStoreBinding;
var value3;
var moduleValue2;
let value = environment.__proto__.__proto__;
if (env2_8((require(10599) /* metro dependency 10599: useCanFulfillStreamRequest */).canFulfillStreamRequest(a0,
true), 1)[0]) {
channelStoreBinding = ChannelStore;
value3 = channelStoreBinding.getChannel(a0.channel_id);
if (value3 != null) {
value = require(10794) /* metro dependency 10794: useScreenshareUtils */;
value = value.getOSRequirement();
moduleValue2 = require(10794) /* metro dependency 10794: useScreenshareUtils */;
moduleValue2.getStreamPressHandler({'channel': null, 'hasPermission': true, 'isActive': false,
channel: value3,
osRequirement: value})();
}
}
}
function handleTapActivityInviteToJoin(a0) { // fn#86815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:14915, owner: MessagesHandlers.handleTapActivityInviteToJoin, offset: 0x01fa1c89, size: 144 bytes, params: 2, frame: 16
var value;
var selfPresenceStoreBinding;
var value2;
const author = a0.author;
const application = a0.application;
if (author != null) {
if (application != null) {
if (author.id != null) {
value = environment.__proto__.__proto__;
selfPresenceStoreBinding = SelfPresenceStore;
value2 = selfPresenceStoreBinding.getApplicationActivity(application.id, true);
if (value2 != null) {
(importDefault(11328) /* metro dependency 11328: ActivitiesActionCreators */).sendActivityInvite({channelId: a0.channel_id,
type: ActivityActionTypes.JOIN, activity: value2, location: AnalyticsLocations.MESSAGE_EMBED});
}
}
}
}
}
function handleTapGuildEventInvite({invite, isMember, primary, secondary, guildEventId, recurrenceId}) { // fn#86816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:15168, owner: MessagesHandlers.handleTapGuildEventInvite, offset: 0x01fa1d19, size: 456 bytes, params: 2, frame: 22
var object2;
var r6;
var value6;
var moduleValue2;
let value = null;
const r7 = value == invite ? guildEventId : value == invite.guild_scheduled_event ? undefined : invite.guild_scheduled_event.id;
const guildScheduledEvent = GuildScheduledEventStore.getGuildScheduledEvent(r7);
if (value == guildScheduledEvent) {
return {action: 'noop'};
}
if (value == r7) {
return {action: 'noop'};
}
if (isMember) {
if (secondary) {
r6 = value != invite ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: invite.code,
guildScheduledEventId: r7}) : value;
value6 = undefined;
moduleValue2 = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
moduleValue2.openShareEvent(guildScheduledEvent,
value != r6 ? (importDefault(7147) /* metro dependency 7147: getInviteURL */)(r6) : value6);
return {action: 'share'};
}
if (primary) {
if (isGuildScheduledEventActive(guildScheduledEvent)) {
(require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */).transitionToEventDetailsFromInvite(guildScheduledEvent,
recurrenceId);
object2 = {action: 'transition'};
} else {
value = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
if (primary) {
value.handleGuildScheduledEventRsvp(guildScheduledEvent.id, recurrenceId,
guildScheduledEvent.guild_id);
object2 = {action: 'rsvp'};
} else {
value.transitionToEventDetailsFromInvite(guildScheduledEvent, recurrenceId);
object2 = {action: 'transition'};
}
}
} else {
value = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
if (primary) {
value.handleGuildScheduledEventRsvp(guildScheduledEvent.id, recurrenceId, guildScheduledEvent.guild_id);
object2 = {action: 'rsvp'};
} else {
value.transitionToEventDetailsFromInvite(guildScheduledEvent, recurrenceId);
object2 = {action: 'transition'};
}
}
return object2;
}
if (value == invite) {
if (secondary) {
r6 = value != invite ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: invite.code,
guildScheduledEventId: r7}) : value;
value6 = undefined;
moduleValue2 = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
moduleValue2.openShareEvent(guildScheduledEvent,
value != r6 ? (importDefault(7147) /* metro dependency 7147: getInviteURL */)(r6) : value6);
return {action: 'share'};
}
if (primary) {
if (isGuildScheduledEventActive(guildScheduledEvent)) {
(require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */).transitionToEventDetailsFromInvite(guildScheduledEvent,
recurrenceId);
object2 = {action: 'transition'};
} else {
value = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
if (primary) {
value.handleGuildScheduledEventRsvp(guildScheduledEvent.id, recurrenceId,
guildScheduledEvent.guild_id);
object2 = {action: 'rsvp'};
} else {
value.transitionToEventDetailsFromInvite(guildScheduledEvent, recurrenceId);
object2 = {action: 'transition'};
}
}
} else {
value = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
if (primary) {
value.handleGuildScheduledEventRsvp(guildScheduledEvent.id, recurrenceId, guildScheduledEvent.guild_id);
object2 = {action: 'rsvp'};
} else {
value.transitionToEventDetailsFromInvite(guildScheduledEvent, recurrenceId);
object2 = {action: 'transition'};
}
}
return object2;
}
(HandleAcceptEventInstantInvite)(invite);
return {action: 'accept'};
}
function _questsEmbedOnPress(a0) { // fn#86817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:15891, owner: MessagesHandlers._questsEmbedOnPress, offset: 0x01fa1ee1, size: 237 bytes, params: 2, frame: 19
var moduleValue2;
var findQuestOrReplacement;
var questStoreBinding;
var questOrReplacement;
const QuestContent = (QuestContentModule).QuestContent;
const value = environment.__proto__.__proto__;
if (!MetaQuestUtilsAndroidModule.isMetaQuest()) {
moduleValue2 = require(7091) /* metro dependency 7091: QuestDataUtils */;
findQuestOrReplacement = moduleValue2.findQuestOrReplacement;
questStoreBinding = QuestStore;
questOrReplacement = Reflect.apply(findQuestOrReplacement, moduleValue2, [a0, questStoreBinding.quests,
questStoreBinding.excludedQuests]);
if (questOrReplacement != null) {
(require(9480) /* metro dependency 9480: QuestUtilsNative */).openQuestHome({scrollToQuestId: questOrReplacement.id,
fromContent: QuestContent.QUEST_EMBED_MOBILE});
} else {
(require(9480) /* metro dependency 9480: QuestUtilsNative */).openQuestHome({fromContent: QuestContent.QUEST_EMBED_MOBILE});
}
}
}
function _questsEmbedOnAccept(a0) { // fn#86818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:16211, owner: MessagesHandlers._questsEmbedOnAccept, offset: 0x01fa1fce, size: 568 bytes, params: 2, frame: 23
var moduleValue2;
var findQuestOrReplacement;
var questStoreBinding;
var questOrReplacement;
var openQuestHome;
var object;
const QuestContent = (QuestContentModule).QuestContent;
var QUEST_EMBED_MOBILE;
var userStatus;
var value4;
var expiresAt;
var date;
var moduleValue3;
var enrollInQuest;
var id;
let value = environment.__proto__.__proto__;
const value2 = undefined;
if ((require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest()) {
(require(9480) /* metro dependency 9480: QuestUtilsNative */).openDiscordQuestsFAQ();
} else {
moduleValue2 = require(7091) /* metro dependency 7091: QuestDataUtils */;
findQuestOrReplacement = moduleValue2.findQuestOrReplacement;
questStoreBinding = QuestStore;
questOrReplacement = Reflect.apply(findQuestOrReplacement, moduleValue2, [a0, questStoreBinding.quests,
questStoreBinding.excludedQuests]);
if (questOrReplacement != null) {
if (questStoreBinding.questEnrollmentBlockedUntil != null) {
(require(9480) /* metro dependency 9480: QuestUtilsNative */).openQuestHome({scrollToQuestId: questOrReplacement.id,
fromContent: QuestContent.QUEST_EMBED_MOBILE});
} else {
userStatus = questOrReplacement.userStatus;
value4 = (userStatus == null ? value2 : userStatus.enrolledAt) != null;
expiresAt = questOrReplacement.config.expiresAt;
date = new global.Date();
if (!(value4 || expiresAt < date.toISOString())) {
moduleValue3 = require(9484) /* metro dependency 9484: QuestActionCreators */;
enrollInQuest = moduleValue3.enrollInQuest;
id = questOrReplacement.id;
object = {};
QUEST_EMBED_MOBILE = QuestContent.QUEST_EMBED_MOBILE;
object.questContent = QUEST_EMBED_MOBILE;
object.questContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA.ACCEPT_QUEST;
QUEST_EMBED_MOBILE = QuestContent.QUEST_EMBED_MOBILE;
object.sourceQuestContent = QUEST_EMBED_MOBILE;
Reflect.apply(enrollInQuest, moduleValue3, [id, object]);
}
value = require(9480) /* metro dependency 9480: QuestUtilsNative */;
openQuestHome = value.openQuestHome;
id = questOrReplacement.id;
QUEST_EMBED_MOBILE = QuestContent.QUEST_EMBED_MOBILE;
Reflect.apply(openQuestHome, value, [{scrollToQuestId: id, fromContent: QUEST_EMBED_MOBILE}]);
}
} else {
(require(9480) /* metro dependency 9480: QuestUtilsNative */).openQuestHome({fromContent: QuestContent.QUEST_EMBED_MOBILE});
}
}
return value2;
}
function handleTapInviteEmbedAccept(a0) { // fn#86819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:17049, owner: MessagesHandlers.handleTapInviteEmbedAccept, offset: 0x01fa2206, size: 1236 bytes, params: 2, frame: 26
var environment;
var r5;
var id;
var roles;
var r9;
var r4;
var action;
var property;
var code;
var moduleValue2;
var openSocialLayerStorefrontProductDetailsModal;
var object;
var inviteStoreBinding;
var getInvite;
var value9;
var id2;
var guildMemberStoreBinding;
var isMember;
var guild;
var isMember2;
var value11;
var value12;
var Set;
var set;
var moduleValue3;
var getInviteInstanceId;
var value16;
var moduleValue4;
var moduleValue6;
var getVoiceChannelListInviteExperiment;
var moduleValue7;
var trackInviteEmbedActioned;
let value = environment.__proto__.__proto__;
const value2 = undefined;
const {messageId, index, primary,
secondary} = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
let binding = env0_0;
const messageData = binding.getMessageData(messageId);
if (messageData != null) {
var message = messageData.message;
binding = env0_0;
var getParams = binding.getParams;
var current = Reflect.apply(getParams, binding, []).chatInputRef.current;
if (current != null) {
current.dismissKeyboard();
}
var codedLinks = getCodedLinks(message);
r5 = codedLinks == null ? value2 : codedLinks[index];
if (r5 == null) {
return value2;
}
var type = r5.type;
var CodedLinkType = (require(4101) /* metro dependency 4101: CodedLink */).CodedLinkType;
var INVITE = CodedLinkType.INVITE;
if (type === INVITE) {
inviteStoreBinding = InviteStore;
getInvite = inviteStoreBinding.getInvite;
code = r5.code;
value9 = Reflect.apply(getInvite, inviteStoreBinding, [code]);
if (value9 == null) {
return value2;
}
id2 = AuthenticationStore.getId();
guildMemberStoreBinding = GuildMemberStore;
isMember = guildMemberStoreBinding.isMember;
if (value9 == null) {
id = value2;
} else {
guild = value9.guild;
id = guild == null ? value2 : guild.id;
}
isMember2 = Reflect.apply(isMember, guildMemberStoreBinding, [id, id2]);
value11 = false;
if (isMember2) {
roles = value9.roles;
if (roles != null) {
roles = value9.roles;
if (roles.length > 0) {
guild = value9.guild;
if ((guild == null ? value2 : guild.id) != null) {
guildMemberStoreBinding = GuildMemberStore;
value12 = guildMemberStoreBinding.getMember(value9.guild.id, id2);
Set = global.Set;
roles = value12 == null ? value2 : value12.roles;
r9 = roles ?? [];
set = new Set();
roles = value9.roles;
r4 = roles.some(_fun86820);
} else {
r4 = value11;
}
} else {
r4 = value11;
}
} else {
r4 = value11;
}
} else {
r4 = value11;
}
moduleValue3 = require(4098) /* metro dependency 4098: InviteCodeUtils */;
getInviteInstanceId = moduleValue3.getInviteInstanceId;
code = r5.code;
id = message.id;
value16 = Reflect.apply(getInviteInstanceId, moduleValue3, [code, id]);
moduleValue4 = require(4116) /* metro dependency 4116: InviteTypeUtils */;
if (moduleValue4.isGuildScheduledEventInviteEmbed(value9)) {
binding = env0_0;
action = binding.handleTapGuildEventInvite({invite: value9, isMember: isMember2, primary: primary,
secondary: secondary}).action;
} else if (isMember2) {
if (r4) {
env0_0.handleAcceptInstantInvite(value9, value16);
action = 'accept';
} else {
env0_0.handleTransitionToInviteChannel(value9);
action = 'transition';
}
} else {
env0_0.handleAcceptInstantInvite(value9, value16);
action = 'accept';
}
guild = value9.guild;
id = guild == null ? value2 : guild.id;
if (id == null) {
r4 = [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INVITE_EMBED];
} else if ((require(4116) /* metro dependency 4116: InviteTypeUtils */).getGuildInviteExtendedType(value9) !== (require(4116) /* metro dependency 4116: InviteTypeUtils */).GuildInviteExtendedType.VOICE_CHANNEL) {
r4 = [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INVITE_EMBED];
} else {
moduleValue6 = require(9856) /* metro dependency 9856: VoiceChannelListInviteExperiment */;
getVoiceChannelListInviteExperiment = moduleValue6.getVoiceChannelListInviteExperiment;
object = {guildId: id, location: 'mobile_invite_embed'};
if (Reflect.apply(getVoiceChannelListInviteExperiment, moduleValue6, [object]).enabled) {
moduleValue7 = require(9857) /* metro dependency 9857: VoiceChannelListInviteEmbed */;
if (moduleValue7.canShowVoiceChannelListInviteEmbed(value9)) {
object = [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INVITE_EMBED];
object[1] = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).VOICE_CHANNEL_LIST_INVITE_EMBED;
r4 = object;
} else {
r4 = [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INVITE_EMBED];
}
} else {
r4 = [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INVITE_EMBED];
}
}
value = require(8879) /* metro dependency 8879: InstantInviteActionCreators */;
trackInviteEmbedActioned = value.trackInviteEmbedActioned;
object = {invite: value9, action: action};
id = message.author.id;
object.inviter_id = id;
id = message.id;
object.invite_message_id = id;
object.invite_instance_id = value16;
Reflect.apply(trackInviteEmbedActioned, value, [object, r4]);
return value2;
}
type = r5.type;
var QUESTS_EMBED = CodedLinkType.QUESTS_EMBED;
if (type === QUESTS_EMBED) {
binding = env0_0;
binding._questsEmbedOnAccept(r5.code);
} else if (r5.type === CodedLinkType.SOCIAL_LAYER_STOREFRONT) {
property = env2_8(r5.code.split('-'), 1)[0];
moduleValue2 = require(10437) /* metro dependency 10437: SocialLayerStorefrontNativeActionCreators */;
openSocialLayerStorefrontProductDetailsModal = moduleValue2.openSocialLayerStorefrontProductDetailsModal;
object = {skuId: property};
object.analyticsLocations = [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).GIFT_CODE_EMBED];
Reflect.apply(openSocialLayerStorefrontProductDetailsModal, moduleValue2, [object]);
} else if (r5.type === CodedLinkType.SOCIAL_LAYER_STOREFRONT_APP) {
property = env2_8(r5.code.split('-'), 1)[0];
moduleValue2 = require(10437) /* metro dependency 10437: SocialLayerStorefrontNativeActionCreators */;
openSocialLayerStorefrontProductDetailsModal = moduleValue2.openSocialLayerStorefrontProductDetailsModal;
object = {skuId: property};
object.analyticsLocations = [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).GIFT_CODE_EMBED];
Reflect.apply(openSocialLayerStorefrontProductDetailsModal, moduleValue2, [object]);
}
}
return value2;
function _fun86820({id}) { // fn#86820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:17687, offset: 0x011289b2, size: 30 bytes, params: 2, frame: 11
const binding = env0_0;
return !binding.has(id);
}
}
function handleTapInviteEmbed(a0) { // fn#86821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:18894, owner: MessagesHandlers.handleTapInviteEmbed, offset: 0x01fa26da, size: 2479 bytes, params: 2, frame: 29
var r15;
var id;
var r2;
var r4;
var action;
var property;
var code;
var object;
var moduleValue2;
var openSocialLayerStorefrontProductDetailsModal;
var applicationDirectoryApplicationsStoreBinding;
var value11;
var property2;
var value14;
var property3;
var property4;
var guildMemberStoreBinding;
var isMember;
var moduleValue3;
var getExperimentFromEmbedURL;
var value15;
var getExperimentTreatmentFromEmbedURL;
var inviteStoreBinding;
var value16;
var guild;
var isMember2;
const GuildInviteExtendedType = require(dependencyMap[61]).GuildInviteExtendedType;
var moduleValue6;
var moduleValue8;
var channel;
var handleAcceptInstantInvite;
var moduleValue9;
var defaultImport2;
var openLazy;
var value22;
var value23;
const GuildProfileCTAContext = require(dependencyMap[121]).GuildProfileCTAContext;
var channelStoreBinding;
var value25;
var guildId;
var INVITE_EMBED;
var trackInviteServerClicked;
let value = environment.__proto__.__proto__;
const value2 = undefined;
const {messageId, index, primary, secondary} = require(dependencyMap[44]).getNativeSyntheticEventData(a0);
let binding = env0_0;
const messageData = binding.getMessageData(messageId);
if (messageData != null) {
var message = messageData.message;
binding = env0_0;
var getParams = binding.getParams;
var current = Reflect.apply(getParams, binding, []).chatInputRef.current;
if (current != null) {
current.dismissKeyboard();
}
var codedLinks = getCodedLinks(message);
r15 = codedLinks == null ? value2 : codedLinks[index];
if (r15 == null) {
return value2;
}
var id2 = AuthenticationStore.getId();
var type = r15.type;
var CodedLinkType = require(dependencyMap[115]).CodedLinkType;
var INVITE = CodedLinkType.INVITE;
if (type === INVITE) {
inviteStoreBinding = InviteStore;
value16 = inviteStoreBinding.getInvite(r15.code);
guildMemberStoreBinding = GuildMemberStore;
isMember = guildMemberStoreBinding.isMember;
id = value16 == null || value16.guild == null ? value2 : value16.guild.id;
isMember2 = Reflect.apply(isMember, guildMemberStoreBinding, [id, id2]);
if (value16 == null) {
return value2;
}
guild = value16.guild;
id = guild == null ? value2 : guild.id;
r2 = id != null && require(dependencyMap[61]).getGuildInviteExtendedType(value16) === GuildInviteExtendedType.VOICE_CHANNEL;
if (r2) {
moduleValue6 = require(dependencyMap[116]);
r2 = moduleValue6.getVoiceChannelListInviteExperiment({guildId: id,
location: 'mobile_invite_embed'}).enabled;
}
r2 = r2 && require(dependencyMap[117]).canShowVoiceChannelListInviteEmbed(value16);
moduleValue8 = require(dependencyMap[61]);
if (moduleValue8.isGuildScheduledEventInviteEmbed(value16)) {
binding = env0_0;
action = binding.handleTapGuildEventInvite({invite: value16, isMember: isMember2, primary: primary,
secondary: secondary}).action;
} else if (r2) {
channel = value16.channel;
id = channel == null ? value2 : channel.id;
if (id != null) {
channelStoreBinding = ChannelStore;
value25 = channelStoreBinding.getChannel(value16.channel.id);
if (value25 != null) {
guildId = value25.getGuildId();
if (guildId != null && guildId !== SelectedGuildStore.getGuildId()) {
require(dependencyMap[120]).transitionToGuild(guildId);
}
require(dependencyMap[49]).navigateToVoiceChannel(value25, 'Mobile Invite Embed');
action = 'voice channel preview';
} else {
action = 'noop';
}
} else {
guild = value16.guild;
id = guild == null ? value2 : guild.id;
if (id != null) {
defaultImport2 = importDefault(dependencyMap[55]);
openLazy = defaultImport2.openLazy;
value22 = require(dependencyMap[43])(dependencyMap[73], dependencyMap.paths);
guild = value16.guild;
id = guild.id;
value23 = 'GuildProfileActionSheet:' + id;
guild = value16.guild;
id = guild.id;
Reflect.apply(openLazy, defaultImport2, [value22, value23, {guildId: id,
context: GuildProfileCTAContext.INVITE,
inviteKey: r15.code}]);
action = 'show profile';
} else {
binding = env0_0;
if (isMember2) {
binding.handleTransitionToInviteChannel(value16);
action = 'transition';
} else {
handleAcceptInstantInvite = binding.handleAcceptInstantInvite;
moduleValue9 = require(dependencyMap[106]);
Reflect.apply(handleAcceptInstantInvite, binding, [value16,
moduleValue9.getInviteInstanceId(r15.code,
message.id)]);
action = 'accept';
}
}
}
} else {
guild = value16.guild;
id = guild == null ? value2 : guild.id;
if (id != null) {
defaultImport2 = importDefault(dependencyMap[55]);
openLazy = defaultImport2.openLazy;
value22 = require(dependencyMap[43])(dependencyMap[73], dependencyMap.paths);
guild = value16.guild;
id = guild.id;
value23 = 'GuildProfileActionSheet:' + id;
guild = value16.guild;
id = guild.id;
Reflect.apply(openLazy, defaultImport2, [value22, value23, {guildId: id,
context: GuildProfileCTAContext.INVITE,
inviteKey: r15.code}]);
action = 'show profile';
} else {
binding = env0_0;
if (isMember2) {
binding.handleTransitionToInviteChannel(value16);
action = 'transition';
} else {
handleAcceptInstantInvite = binding.handleAcceptInstantInvite;
moduleValue9 = require(dependencyMap[106]);
Reflect.apply(handleAcceptInstantInvite, binding, [value16,
moduleValue9.getInviteInstanceId(r15.code,
message.id)]);
action = 'accept';
}
}
}
INVITE_EMBED = importDefault(dependencyMap[40]).INVITE_EMBED;
if (r2) {
object = [INVITE_EMBED];
object[1] = importDefault(dependencyMap[40]).VOICE_CHANNEL_LIST_INVITE_EMBED;
r4 = object;
} else {
r4 = [INVITE_EMBED];
}
value = require(dependencyMap[118]);
trackInviteServerClicked = value.trackInviteServerClicked;
id = value16 == null || value16.guild == null ? value2 : value16.guild.id;
Reflect.apply(trackInviteServerClicked, value, [id, action, r4]);
return value2;
}
type = r15.type;
var EMBEDDED_ACTIVITY_INVITE = CodedLinkType.EMBEDDED_ACTIVITY_INVITE;
if (type === EMBEDDED_ACTIVITY_INVITE) {
inviteStoreBinding = InviteStore;
value16 = inviteStoreBinding.getInvite(r15.code);
guildMemberStoreBinding = GuildMemberStore;
isMember = guildMemberStoreBinding.isMember;
id = value16 == null || value16.guild == null ? value2 : value16.guild.id;
isMember2 = Reflect.apply(isMember, guildMemberStoreBinding, [id, id2]);
if (value16 == null) {
return value2;
}
guild = value16.guild;
id = guild == null ? value2 : guild.id;
r2 = id != null && require(dependencyMap[61]).getGuildInviteExtendedType(value16) === GuildInviteExtendedType.VOICE_CHANNEL;
if (r2) {
moduleValue6 = require(dependencyMap[116]);
r2 = moduleValue6.getVoiceChannelListInviteExperiment({guildId: id,
location: 'mobile_invite_embed'}).enabled;
}
r2 = r2 && require(dependencyMap[117]).canShowVoiceChannelListInviteEmbed(value16);
moduleValue8 = require(dependencyMap[61]);
if (moduleValue8.isGuildScheduledEventInviteEmbed(value16)) {
binding = env0_0;
action = binding.handleTapGuildEventInvite({invite: value16, isMember: isMember2, primary: primary,
secondary: secondary}).action;
} else if (r2) {
channel = value16.channel;
id = channel == null ? value2 : channel.id;
if (id != null) {
channelStoreBinding = ChannelStore;
value25 = channelStoreBinding.getChannel(value16.channel.id);
if (value25 != null) {
guildId = value25.getGuildId();
if (guildId != null && guildId !== SelectedGuildStore.getGuildId()) {
require(dependencyMap[120]).transitionToGuild(guildId);
}
require(dependencyMap[49]).navigateToVoiceChannel(value25, 'Mobile Invite Embed');
action = 'voice channel preview';
} else {
action = 'noop';
}
} else {
guild = value16.guild;
id = guild == null ? value2 : guild.id;
if (id != null) {
defaultImport2 = importDefault(dependencyMap[55]);
openLazy = defaultImport2.openLazy;
value22 = require(dependencyMap[43])(dependencyMap[73], dependencyMap.paths);
guild = value16.guild;
id = guild.id;
value23 = 'GuildProfileActionSheet:' + id;
guild = value16.guild;
id = guild.id;
Reflect.apply(openLazy, defaultImport2, [value22, value23, {guildId: id,
context: GuildProfileCTAContext.INVITE,
inviteKey: r15.code}]);
action = 'show profile';
} else {
binding = env0_0;
if (isMember2) {
binding.handleTransitionToInviteChannel(value16);
action = 'transition';
} else {
handleAcceptInstantInvite = binding.handleAcceptInstantInvite;
moduleValue9 = require(dependencyMap[106]);
Reflect.apply(handleAcceptInstantInvite, binding, [value16,
moduleValue9.getInviteInstanceId(r15.code,
message.id)]);
action = 'accept';
}
}
}
} else {
guild = value16.guild;
id = guild == null ? value2 : guild.id;
if (id != null) {
defaultImport2 = importDefault(dependencyMap[55]);
openLazy = defaultImport2.openLazy;
value22 = require(dependencyMap[43])(dependencyMap[73], dependencyMap.paths);
guild = value16.guild;
id = guild.id;
value23 = 'GuildProfileActionSheet:' + id;
guild = value16.guild;
id = guild.id;
Reflect.apply(openLazy, defaultImport2, [value22, value23, {guildId: id,
context: GuildProfileCTAContext.INVITE,
inviteKey: r15.code}]);
action = 'show profile';
} else {
binding = env0_0;
if (isMember2) {
binding.handleTransitionToInviteChannel(value16);
action = 'transition';
} else {
handleAcceptInstantInvite = binding.handleAcceptInstantInvite;
moduleValue9 = require(dependencyMap[106]);
Reflect.apply(handleAcceptInstantInvite, binding, [value16,
moduleValue9.getInviteInstanceId(r15.code,
message.id)]);
action = 'accept';
}
}
}
INVITE_EMBED = importDefault(dependencyMap[40]).INVITE_EMBED;
if (r2) {
object = [INVITE_EMBED];
object[1] = importDefault(dependencyMap[40]).VOICE_CHANNEL_LIST_INVITE_EMBED;
r4 = object;
} else {
r4 = [INVITE_EMBED];
}
value = require(dependencyMap[118]);
trackInviteServerClicked = value.trackInviteServerClicked;
id = value16 == null || value16.guild == null ? value2 : value16.guild.id;
Reflect.apply(trackInviteServerClicked, value, [id, action, r4]);
return value2;
}
type = r15.type;
var TEMPLATE = CodedLinkType.TEMPLATE;
if (type === TEMPLATE) {
value = importDefault(dependencyMap[122]);
value.showModal(r15.code);
return value2;
}
type = r15.type;
var BUILD_OVERRIDE = CodedLinkType.BUILD_OVERRIDE;
if (type === BUILD_OVERRIDE) {
value = require(dependencyMap[123]);
value.toggleOverride(r15.code);
return value2;
}
type = r15.type;
var MANUAL_BUILD_OVERRIDE = CodedLinkType.MANUAL_BUILD_OVERRIDE;
if (type === MANUAL_BUILD_OVERRIDE) {
value = require(dependencyMap[123]);
value.toggleOverride(r15.code);
return value2;
}
type = r15.type;
var EXPERIMENT = CodedLinkType.EXPERIMENT;
if (type === EXPERIMENT) {
moduleValue3 = require(dependencyMap[124]);
getExperimentFromEmbedURL = moduleValue3.getExperimentFromEmbedURL;
code = r15.code;
value15 = Reflect.apply(getExperimentFromEmbedURL, moduleValue3, [code]);
if (value15 == null) {
return value2;
}
value = require(dependencyMap[124]);
getExperimentTreatmentFromEmbedURL = value.getExperimentTreatmentFromEmbedURL;
code = r15.code;
value = Reflect.apply(getExperimentTreatmentFromEmbedURL, value, [code]);
require(dependencyMap[125]).handleCodedLinkExperimentEmbedTap(value15, value);
return value2;
}
type = r15.type;
var EVENT = CodedLinkType.EVENT;
if (type === EVENT) {
value14 = env2_8(r15.code.split('-'), 3);
property = value14[0];
property3 = value14[1];
property4 = value14[2];
value = GuildMemberStore.isMember(property, id2);
binding = env0_0;
binding.handleTapGuildEventInvite({invite: null, isMember: value, primary: primary, secondary: secondary,
guildEventId: property3, recurrenceId: property4});
return value2;
}
type = r15.type;
var CHANNEL_LINK = CodedLinkType.CHANNEL_LINK;
if (type === CHANNEL_LINK) {
value = env2_8(r15.code.split('/'), 2);
property = value[0];
property2 = value[1];
binding = env0_0;
binding.handleTapVoiceChannelPreview({guildId: property, channelId: property2, message: message});
return value2;
}
type = r15.type;
var APP_DIRECTORY_PROFILE = CodedLinkType.APP_DIRECTORY_PROFILE;
if (type === APP_DIRECTORY_PROFILE) {
applicationDirectoryApplicationsStoreBinding = ApplicationDirectoryApplicationsStore;
value11 = applicationDirectoryApplicationsStoreBinding.getApplication(r15.code);
if (value11 == null) {
return value2;
}
require(dependencyMap[126]).installApplication({applicationId: value11.id,
customInstallUrl: value11.custom_install_url, installParams: value11.install_params,
integrationTypesConfig: value11.integration_types_config, source: 'app_directory_profile_embed'});
return value2;
}
type = r15.type;
var QUESTS_EMBED = CodedLinkType.QUESTS_EMBED;
if (type === QUESTS_EMBED) {
binding = env0_0;
binding._questsEmbedOnPress(r15.code);
return value2;
}
type = r15.type;
var SOCIAL_LAYER_STOREFRONT = CodedLinkType.SOCIAL_LAYER_STOREFRONT;
if (type === SOCIAL_LAYER_STOREFRONT) {
property = env2_8(r15.code.split('-'), 1)[0];
moduleValue2 = require(dependencyMap[119]);
openSocialLayerStorefrontProductDetailsModal = moduleValue2.openSocialLayerStorefrontProductDetailsModal;
object = {skuId: property};
object.analyticsLocations = [importDefault(dependencyMap[40]).GIFT_CODE_EMBED];
Reflect.apply(openSocialLayerStorefrontProductDetailsModal, moduleValue2, [object]);
return value2;
}
type = r15.type;
var SOCIAL_LAYER_STOREFRONT_APP = CodedLinkType.SOCIAL_LAYER_STOREFRONT_APP;
if (type === SOCIAL_LAYER_STOREFRONT_APP) {
property = env2_8(r15.code.split('-'), 1)[0];
moduleValue2 = require(dependencyMap[119]);
openSocialLayerStorefrontProductDetailsModal = moduleValue2.openSocialLayerStorefrontProductDetailsModal;
object = {skuId: property};
object.analyticsLocations = [importDefault(dependencyMap[40]).GIFT_CODE_EMBED];
Reflect.apply(openSocialLayerStorefrontProductDetailsModal, moduleValue2, [object]);
return value2;
}
type = r15.type;
var APP_OAUTH2_LINK = CodedLinkType.APP_OAUTH2_LINK;
if (type !== APP_OAUTH2_LINK) {
throw global.Error('Unknown coded link type: ' + r15.type);
}
var application = ApplicationStore.getApplication(r15.code);
if (application == null) {
return value2;
}
var defaultImport = importDefault(dependencyMap[89]);
var trackWithMetadata = defaultImport.trackWithMetadata;
var APP_OAUTH2_LINK_EMBED_CTA_CLICKED = AnalyticEvents.APP_OAUTH2_LINK_EMBED_CTA_CLICKED;
Reflect.apply(trackWithMetadata, defaultImport, [APP_OAUTH2_LINK_EMBED_CTA_CLICKED,
{application_id: application.id}]);
value = require(dependencyMap[126]);
value.installApplication({applicationId: application.id, customInstallUrl: application.customInstallUrl,
installParams: application.installParams, integrationTypesConfig: application.integrationTypesConfig,
source: 'app_oauth2_link_embed'});
}
return value2;
}
function handleTapVoiceChannelPreview({guildId, channelId, message}) { // fn#86822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:22668, owner: MessagesHandlers.handleTapVoiceChannelPreview, offset: 0x01fa3089, size: 438 bytes, params: 2, frame: 22
var defaultImport;
var binding;
var current;
var moduleValue;
var moduleValue2;
var moduleValue3;
const value = environment.__proto__.__proto__;
const guildId2 = SelectedGuildStore.getGuildId();
const channelId2 = SelectedChannelStore.getChannelId(guildId2);
const channel = ChannelStore.getChannel(channelId);
if (channel != null) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.CHANNEL_LINK_PREVIEW_JOINED, {author_id: message.author.id,
link_guild_id: guildId, link_channel_id: channelId, link_channel_type: channel.type, guild_id: guildId2,
channel_id: channelId2});
binding = env0_0;
current = binding.getParams().chatInputRef.current;
if (current != null) {
current.dismissKeyboard();
}
moduleValue = require(5072) /* metro dependency 5072: AgeGateUtils */;
if (moduleValue.shouldShowAgeGateForVoiceChannel(channelId)) {
moduleValue3 = require(1230) /* metro dependency 1230: router_utils */;
moduleValue3.transitionTo(Routes.CHANNEL(guildId, channelId));
} else {
moduleValue2 = require(5087) /* metro dependency 5087: SpoilerChannelUtils */;
if (moduleValue2.shouldShowSpoilerGateForChannelId(channelId)) {
moduleValue3 = require(1230) /* metro dependency 1230: router_utils */;
moduleValue3.transitionTo(Routes.CHANNEL(guildId, channelId));
} else if (channel.isGuildStageVoice()) {
(require(8113) /* metro dependency 8113: StageChannelModalActionCreators */).connectAndOpen(channel);
} else {
(importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */).selectVoiceChannel(channelId);
(require(7709) /* metro dependency 7709: PrivateChannelCallUtils */).openChannelCallModal(channel);
}
}
}
}
function handleTapJoinActivity(a0) { // fn#86823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:23279, owner: MessagesHandlers.handleTapJoinActivity, offset: 0x01fa323f, size: 181 bytes, params: 2, frame: 14
var message;
var activity;
var type;
const getNativeSyntheticEventData = MessageDataSnowflakeUtilsModule.getNativeSyntheticEventData;
const messageData = env0_0.getMessageData(Reflect.apply(getNativeSyntheticEventData,
MessageDataSnowflakeUtilsModule, [a0]).messageId);
if (messageData != null) {
message = messageData.message;
activity = message.activity;
if (activity != null) {
type = activity.type;
if (type === ActivityActionTypes.LISTEN) {
env0_0.handleTapSpotifyResource(message);
} else if (type === ActivityActionTypes.JOIN) {
env0_0.handleTapActivityResource(message);
} else if (type === ActivityActionTypes.STREAM_REQUEST) {
env0_0.handleTapStreamRequest(message);
}
}
}
}
function handleTapJoinRichPresence(a0) { // fn#86824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:23608, owner: MessagesHandlers.handleTapJoinRichPresence, offset: 0x01fa32f4, size: 218 bytes, params: 2, frame: 14
var message;
var activity;
var type;
const getNativeSyntheticEventData = MessageDataSnowflakeUtilsModule.getNativeSyntheticEventData;
const messageData = env0_0.getMessageData(Reflect.apply(getNativeSyntheticEventData,
MessageDataSnowflakeUtilsModule, [a0]).messageId);
if (messageData != null) {
message = messageData.message;
activity = message.activity;
if (activity != null) {
type = activity.type;
if (type === ActivityActionTypes.LISTEN) {
env0_0.handleTapSpotifyResource(message);
} else if (type === ActivityActionTypes.JOIN) {
env0_0.handleTapActivityResource(message);
} else if (type === ActivityActionTypes.JOIN_REQUEST) {
env0_0.handleTapActivityInviteToJoin(message);
} else if (type === ActivityActionTypes.STREAM_REQUEST) {
env0_0.handleTapStreamRequest(message);
}
}
}
}
function handleAcceptInstantInvite(a0, a1) { // fn#86825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:23994, owner: MessagesHandlers.handleAcceptInstantInvite, offset: 0x01fa33ce, size: 352 bytes, params: 3, frame: 18
var acceptInvite;
var object;
var object2;
var defaultImport;
var handleShowUpsellAlert;
var INVITE_EMBED;
let value = environment.__proto__.__proto__;
if (!AgeGateUtilsModule.handleNSFWGuildInvite(a0)) {
var code = a0.code;
if (code == null) {
return undefined;
}
var type = a0.type;
var GUILD = InviteTypes.GUILD;
if (type !== GUILD) {
value = importDefault(8879) /* metro dependency 8879: InstantInviteActionCreators */;
acceptInvite = value.acceptInvite;
object = {};
object.inviteKey = a0.code;
object2 = {location: 'Invite Button Embed'};
copyDataProperties(object2, a1 != null ? {invite_instance_id: a1} : {}, a1);
object.context = object2;
object.callback = env0_0.handleTransitionToInviteChannel;
Reflect.apply(acceptInvite, value, [object]);
return undefined;
}
var moduleValue2 = require(6823) /* metro dependency 6823: GuildCapUpsellHooks */;
if (moduleValue2.isAtGuildCapAndNonPremium()) {
defaultImport = importDefault(7882) /* metro dependency 7882: PremiumUpsellUtils */;
handleShowUpsellAlert = defaultImport.handleShowUpsellAlert;
object = {};
object.initialUpsellKey = UpsellTypes.GUILD_CAP;
INVITE_EMBED = AnalyticsPages.INVITE_EMBED;
object.analyticsLocation = {page: INVITE_EMBED};
INVITE_EMBED = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INVITE_EMBED;
object.analyticsLocations = [INVITE_EMBED];
object.analyticsProperties = {type: PremiumUpsellTypes.GUILD_CAP_MODAL_UPSELL};
Reflect.apply(handleShowUpsellAlert, defaultImport, [object]);
return undefined;
}
value = importDefault(8879) /* metro dependency 8879: InstantInviteActionCreators */;
acceptInvite = value.acceptInvite;
object = {};
code = a0.code;
object.inviteKey = code;
object2 = {location: 'Invite Button Embed'};
copyDataProperties(object2, a1 != null ? {invite_instance_id: a1} : {}, a1);
object.context = object2;
object.callback = env0_0.handleTransitionToInviteChannel;
Reflect.apply(acceptInvite, value, [object]);
}
}
function handleTransitionToInviteChannel(a0) { // fn#86826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:24537, owner: MessagesHandlers.handleTransitionToInviteChannel, offset: 0x01fa352e, size: 41 bytes, params: 2, frame: 12
const value = environment.__proto__.__proto__;
(InstantInviteActionCreators).transitionToInviteSync(a0);
}
function handleTapGiftCodeAccept(a0) { // fn#86828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:24642, owner: MessagesHandlers.handleTapGiftCodeAccept, offset: 0x01fa3557, size: 484 bytes, params: 2, frame: 21
var r8;
var value5;
var defaultImport;
var defaultImport2;
var pushLazy;
let value = environment.__proto__.__proto__;
const value2 = undefined;
const {giftCode, messageId} = require(dependencyMap[44]).getNativeSyntheticEventData(a0);
const currentUser = UserStore.getCurrentUser();
if (currentUser != null) {
if (currentUser.verified) {
value5 = GiftCodeStore.get(giftCode);
if (value5 != null) {
r8 = value5.giftStyle != null ? env0_0.getMessageData(messageId) : value2;
if (env0_0.params.paymentsBlocked) {
importDefault(dependencyMap[136])();
} else {
defaultImport = importDefault(dependencyMap[127]);
defaultImport.track(AnalyticEvents.OPEN_MODAL, {'type': 'gift_accept', 'location': null});
defaultImport2 = importDefault(dependencyMap[137]);
pushLazy = defaultImport2.pushLazy;
value = require(dependencyMap[43]);
value = value(dependencyMap[138], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport2, [value, {code: giftCode,
customMessage: r8 != null ? r8.message.content : value2,
soundId: r8 == null || r8.message == null || (r8.message.giftInfo == null || r8.message.giftInfo.sound == null) ? value2 : r8.message.giftInfo.sound.id,
emojiName: r8 == null || r8.message == null || (r8.message.giftInfo == null || r8.message.giftInfo.emoji == null) ? value2 : r8.message.giftInfo.emoji.name}]);
}
}
} else {
importDefault(dependencyMap[135]).open();
}
}
return value2;
}
function handleTapReferralRedeem() { // fn#86829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:25296, owner: MessagesHandlers.handleTapReferralRedeem, offset: 0x01fa373b, size: 185 bytes, params: 1, frame: 16
var object;
var defaultImport;
var REFERRAL_MESSAGE_EMBED;
if (ReferralMessageUtilsModule.canOpenPremiumPlanDirectlyForReferralTrial()) {
defaultImport = importDefault(7040) /* metro dependency 7040: openPremiumPlanSelectionActionSheet */;
object = {};
REFERRAL_MESSAGE_EMBED = AnalyticsPages.REFERRAL_MESSAGE_EMBED;
object.analyticsLocation = {page: REFERRAL_MESSAGE_EMBED};
REFERRAL_MESSAGE_EMBED = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).REFERRAL_MESSAGE_EMBED;
object.analyticsLocations = [REFERRAL_MESSAGE_EMBED];
object.premiumType = PremiumTypes.TIER_2;
defaultImport(object);
} else {
(require(7007) /* metro dependency 7007: openUserSettings */).openUserSettings({screen: UserSettingsSections.PREMIUM});
}
}
function getGiftIntentCtaContext(a0) { // fn#86830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:25572, owner: MessagesHandlers.getGiftIntentCtaContext, offset: 0x01fa37f4, size: 181 bytes, params: 2, frame: 17
const value2 = undefined;
const nativeSyntheticEventData = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const messageId = nativeSyntheticEventData.messageId;
const recipientUserId = nativeSyntheticEventData.recipientUserId;
const giftIntentType2 = (PremiumGiftingIntentUtilsModule).parseGiftIntentType(nativeSyntheticEventData.giftIntentType);
if (giftIntentType2 == null) {
return null;
}
const message = env0_0.params.getMessage(messageId);
const r7 = (message == null ? value2 : message.channel_id) ?? env0_0.params.selectedChannelId;
const object = {};
object.channel = ChannelStore.getChannel(r7);
object.giftIntentType = giftIntentType2;
object.messageId = messageId;
object.recipientUserId = recipientUserId;
return object;
}
function handleTapGiftIntentPrimaryCta(a0) { // fn#86831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:25958, owner: MessagesHandlers.handleTapGiftIntentPrimaryCta, offset: 0x01fa38a9, size: 263 bytes, params: 2, frame: 21
var channel;
var giftIntentType;
var recipientUserId;
var userAffinity;
var value3;
var defaultImport;
let value = env0_0.getGiftIntentCtaContext(a0);
if (value != null) {
channel = value.channel;
giftIntentType = value.giftIntentType;
recipientUserId = value.recipientUserId;
value = environment.__proto__.__proto__;
userAffinity = UserAffinitiesV2Store.getUserAffinity(recipientUserId);
value3 = undefined;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.GIFT_INTENT_ACTION_BUTTON_CLICKED, {gift_intent_type: giftIntentType,
affinity: userAffinity == null ? value3 : userAffinity.dmProbability, location_stack: env2_68});
(require(10381) /* metro dependency 10381: openGiftModal */).openGiftModal({recipientUserId: recipientUserId,
analyticsLocation: {page: (channel == null ? value3 : channel.guild_id) != null ? AnalyticsPages.GUILD_CHANNEL : AnalyticsPages.DM_CHANNEL},
analyticsLocations: env2_68, navigationParams: {presentation: 'card'}});
}
}
function handleTapGiftIntentSecondaryCta(a0) { // fn#86832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:26455, owner: MessagesHandlers.handleTapGiftIntentSecondaryCta, offset: 0x01fa39b0, size: 331 bytes, params: 2, frame: 22
var environment;
var value5;
var defaultImport;
var object;
var moduleValue;
var setGiftIntentExpressionPickerConfig;
var intl;
var current;
var openCustomKeyboard;
const giftIntentCtaContext = giftIntentCtaContext2.getGiftIntentCtaContext(a0);
var giftIntentCtaContext2 = giftIntentCtaContext;
if (giftIntentCtaContext != null && giftIntentCtaContext.channel != null) {
value5 = environment.__proto__.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.GIFT_INTENT_CARD_SECONDARY_CTA_CLICKED,
{gift_intent_type: giftIntentCtaContext.giftIntentType, cta_type: 'send_message', location_stack: env2_68});
moduleValue = require(11433) /* metro dependency 11433: GiftIntentExpressionPickerState */;
setGiftIntentExpressionPickerConfig = moduleValue.setGiftIntentExpressionPickerConfig;
object = {};
object.channelId = giftIntentCtaContext.channel.id;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.initialGifQuery = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jrtJi4);
object.onPressGIF = onPressGIF_86833;
Reflect.apply(setGiftIntentExpressionPickerConfig, moduleValue, [object]);
current = giftIntentCtaContext2.params.chatInputRef.current;
if (current != null) {
openCustomKeyboard = current.openCustomKeyboard;
object = {};
object.type = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.EXPRESSION;
object.context = ExpressionPickerViewType.GIF;
Reflect.apply(openCustomKeyboard, current, [object]);
}
}
function handleTapGiftIntentSecondaryCtaOnPressGIF(a0) { // fn#86833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:26799, owner: MessagesHandlers.handleTapGiftIntentSecondaryCta.onPressGIF, offset: 0x01fa3afb, size: 33 bytes, params: 2, frame: 13
env1_0.handleGiftIntentGIFSelected(env0_0, a0);
}
}
function _fun86834() { // fn#86834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:27002, offset: 0x01fa3b1c, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_7(_fun86836);
return _fun86837;
async function _fun86836({channel, giftIntentType}, a1) { // fn#86836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:27022, offset: 0x01fa3b54, size: 518 bytes, params: 3, frame: 29
var r8;
var value9;
var binding;
var binding2;
var value10;
var sendMessage;
var id;
var value12;
var GIFTING;
var value15;
var binding3;
var value16;
var value17;
var value18;
var binding4;
var value21;
var saveDraft;
var value22;
if (false) {
return undefined;
}
value = undefined;
await value;
if (false) {
return undefined;
}
if (channel != null) {
if (a1.url.length === 0) {
return value;
}
var current = env2_1.params.chatInputRef.current;
r8 = current == null ? value : current.getText();
var value7 = '';
var r2 = r8 ?? value7;
var value8 = r2.trim().length > 0;
if (value8) {
value9 = environment.__proto__.__proto__.__proto__.__proto__;
binding = env4_1;
binding2 = env4_3;
value10 = binding(binding2[146]);
sendMessage = value10.sendMessage;
id = channel.id;
value12 = binding(binding2[147]).parse(channel, r2);
GIFTING = env4_39.GIFTING;
await Reflect.apply(sendMessage, value10, [id, value12, true, {location: GIFTING}]);
if (false) {
return undefined;
}
value15 = environment.__proto__.__proto__.__proto__.__proto__;
binding = env4_1;
binding3 = env4_3;
value16 = binding(binding3[146]);
sendMessage = value16.sendMessage;
id = channel.id;
value17 = binding(binding3[147]);
value18 = value17.parse(channel, a1.url);
GIFTING = env4_39.GIFTING;
await Reflect.apply(sendMessage, value16, [id, value18, true, {location: GIFTING}]);
if (false) {
return undefined;
}
current = env2_1.params.chatInputRef.current;
if (current != null) {
current.clearText();
}
binding = env4_1;
binding4 = env4_3;
value21 = binding(binding4[148]);
saveDraft = value21.saveDraft;
id = channel.id;
Reflect.apply(saveDraft, value21, [id, value7, env4_25.ChannelMessage]);
value22 = binding(binding4[127]);
value22.track(env4_45.GIFT_INTENT_MESSAGE_SENT, {gift_intent_type: giftIntentType,
is_custom_message: value8,
location_stack: env4_68});
return value;
}
binding = env4_1;
binding3 = env4_3;
value16 = binding(binding3[146]);
sendMessage = value16.sendMessage;
id = channel.id;
value17 = binding(binding3[147]);
value18 = value17.parse(channel, a1.url);
GIFTING = env4_39.GIFTING;
await Reflect.apply(sendMessage, value16, [id, value18, true, {location: GIFTING}]);
if (false) {
return undefined;
}
current = env2_1.params.chatInputRef.current;
if (current != null) {
current.clearText();
}
binding = env4_1;
binding4 = env4_3;
value21 = binding(binding4[148]);
saveDraft = value21.saveDraft;
id = channel.id;
Reflect.apply(saveDraft, value21, [id, value7, env4_25.ChannelMessage]);
value22 = binding(binding4[127]);
value22.track(env4_45.GIFT_INTENT_MESSAGE_SENT, {gift_intent_type: giftIntentType, is_custom_message: value8,
location_stack: env4_68});
}
return value;
}
function _fun86837() { // fn#86837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:27586, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function handleGiftIntentCardViewed(a0) { // fn#86838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:27664, owner: MessagesHandlers.handleGiftIntentCardViewed, offset: 0x01fa3d5a, size: 203 bytes, params: 2, frame: 18
var moduleValue3;
var trackImpression;
var object;
var premiumGiftingIntentStoreBinding;
const getNativeSyntheticEventData = MessageDataSnowflakeUtilsModule.getNativeSyntheticEventData;
const giftIntentType2 = (PremiumGiftingIntentUtilsModule).parseGiftIntentType(Reflect.apply(getNativeSyntheticEventData,
MessageDataSnowflakeUtilsModule, [a0]).giftIntentType);
if (giftIntentType2 != null) {
moduleValue3 = require(8742) /* metro dependency 8742: useTrackImpression */;
trackImpression = moduleValue3.trackImpression;
object = {};
object.name = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames.GIFT_INTENT_CARD;
object.type = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes.VIEW;
premiumGiftingIntentStoreBinding = PremiumGiftingIntentStore;
object.properties = {gift_intent_type: giftIntentType2,
num_friend_anniversaries: premiumGiftingIntentStoreBinding.getFriendAnniversaries().length};
Reflect.apply(trackImpression, moduleValue3, [object]);
}
}
function handleTapEmoji(a0) { // fn#86839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:27998, owner: MessagesHandlers.handleTapEmoji, offset: 0x01fa3e25, size: 69 bytes, params: 2, frame: 11
const binding = env0_0;
if (!binding.isModalOrActionsheetObstructing()) {
value = environment.__proto__.__proto__;
(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onTapEmoji(a0);
}
}
function handleTapRoleIcon({nativeEvent}) { // fn#86842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:28251, owner: MessagesHandlers.handleTapRoleIcon, offset: 0x01fa3ec8, size: 105 bytes, params: 2, frame: 16
const roleName = nativeEvent.roleName;
const roleIconSource = nativeEvent.roleIconSource;
const value = environment.__proto__.__proto__;
(ToastActionCreators).open({key: 'ROLE_NAME-' + roleName,
content: roleName, icon: {uri: roleIconSource}});
}
function handleTapVoiceChannelBadge(a0) { // fn#86843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:28394, owner: MessagesHandlers.handleTapVoiceChannelBadge, offset: 0x01fa3f31, size: 97 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
const getNativeSyntheticEventData = MessageDataSnowflakeUtilsModule.getNativeSyntheticEventData;
const channel = ChannelStore.getChannel(Reflect.apply(getNativeSyntheticEventData, MessageDataSnowflakeUtilsModule,
[a0]).channelId);
if (channel != null) {
(require(7709) /* metro dependency 7709: PrivateChannelCallUtils */).navigateToVoiceChannel(channel);
}
}
function handleTapGameIcon({nativeEvent}) { // fn#86844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:28540, owner: MessagesHandlers.handleTapGameIcon, offset: 0x01fa3f92, size: 134 bytes, params: 2, frame: 18
var defaultImport;
var openLazy;
const gameApplicationId = nativeEvent.gameApplicationId;
const timestamp = nativeEvent.timestamp;
var value;
const binding = env0_0;
if (!binding.isModalOrActionsheetObstructing()) {
value = environment.__proto__.__proto__;
defaultImport = importDefault(dependencyMap[55]);
openLazy = defaultImport.openLazy;
value = require(dependencyMap[43]);
value = value(dependencyMap[152], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'MessageGameIconActionSheet', {applicationId: gameApplicationId,
messageTimestamp: timestamp}]);
}
}
function handleTapConnectionsRoleTag(a0) { // fn#86846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:28943, owner: MessagesHandlers.handleTapConnectionsRoleTag, offset: 0x01fa4093, size: 146 bytes, params: 2, frame: 20
let value = environment.__proto__.__proto__;
const {userId, guildId, channelId, roleId} = require(dependencyMap[44]).getNativeSyntheticEventData(a0);
value = importDefault(dependencyMap[55]);
value.openLazy(require(dependencyMap[43])(dependencyMap[154], dependencyMap.paths),
'ConnectionsRoleMessageBadgeActionSheet', {userId: userId, guildId: guildId, channelId: channelId,
roleId: roleId});
}
function handleReveal(a0) { // fn#86848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:29356, owner: MessagesHandlers.handleReveal, offset: 0x01fa41a0, size: 104 bytes, params: 2, frame: 16
var messageChannel;
var value5;
var defaultImport;
const value = a0;
const messageData = env0_0.getMessageData(value);
const value4 = null;
if (value4 != messageData) {
messageChannel = messageData.messageChannel;
value5 = environment.__proto__.__proto__;
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
defaultImport.revealMessage(messageChannel.id, env0_0.params.revealedMessageId === value ? value4 : value);
}
}
function handleTapButtonActionComponent(a0) { // fn#86849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:29533, owner: MessagesHandlers.handleTapButtonActionComponent, offset: 0x01fa4208, size: 621 bytes, params: 2, frame: 27
var r4;
var r2;
var messageChannel;
var message;
var moduleValue2;
var value5;
var get;
var moduleValue3;
var value6;
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
var defaultImport;
var show;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var executeMessageComponentInteraction;
let value = environment.__proto__.__proto__;
const {messageId,
componentId} = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const messageData = env0_0.getMessageData(messageId);
if (messageData != null) {
messageChannel = messageData.messageChannel;
message = messageData.message;
r4 = message.applicationId ?? message.author.id;
moduleValue2 = require(4627) /* metro dependency 4627: InteractionComponentUtils */;
value5 = moduleValue2.flattenComponents(message.components);
get = value5.get;
moduleValue3 = require(4633) /* metro dependency 4633: InteractionComponentTypes */;
value6 = Reflect.apply(get, value5, [moduleValue3.asComponentId(componentId)]);
r2 = value6 != null && value6.type === ComponentType.BUTTON;
r2 = r2 && value6.customId != null;
if (r2) {
if (value6.style !== (require(1909) /* metro dependency 1909: Server */).ButtonStyle.PREMIUM) {
value = require(8056) /* metro dependency 8056: InteractionUtils */;
executeMessageComponentInteraction = value.executeMessageComponentInteraction;
object = {};
object.componentType = ComponentType.BUTTON;
object.messageId = messageId;
object.messageFlags = message.flags;
object.customId = value6.customId;
object.componentId = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).asComponentId(componentId);
object.applicationId = r4;
object.channelId = messageChannel.id;
object.guildId = messageChannel.getGuildId();
Reflect.apply(executeMessageComponentInteraction, value, [object]);
} else {
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object = {};
object.title = intl.string(t['ZtdF0+']);
object.body = intl.string(t['0BEZLT']);
object.confirmText = intl.string(t.BddRzS);
Reflect.apply(show, defaultImport, [object]);
}
}
}
}
function handleTapSelectActionComponent(a0) { // fn#86850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:30357, owner: MessagesHandlers.handleTapSelectActionComponent, offset: 0x01fa4475, size: 916 bytes, params: 2, frame: 25
var environment;
var r4;
var r6;
var type;
var messageChannel;
var message;
var flags;
var id;
var guildId;
var moduleValue2;
var value7;
var get;
var moduleValue3;
var value8;
var moduleValue4;
var value9;
const ComponentType = require(dependencyMap[156]).ComponentType;
var object;
var defaultImport;
var openLazy;
var value10;
var object2;
var defaultImport2;
var value11;
var object3;
var defaultImport3;
var value12;
var object4;
let value = environment.__proto__.__proto__;
const value2 = undefined;
const nativeSyntheticEventData = require(dependencyMap[44]).getNativeSyntheticEventData(a0);
const messageId = nativeSyntheticEventData.messageId;
const messageId2 = messageId;
const componentId = nativeSyntheticEventData.componentId;
const messageData = messageId2.getMessageData(messageId);
if (messageData != null) {
messageChannel = messageData.messageChannel;
message = messageData.message;
flags = message.flags;
r4 = message.applicationId ?? message.author.id;
id = messageChannel.id;
guildId = messageChannel.getGuildId();
moduleValue2 = require(dependencyMap[155]);
value7 = moduleValue2.flattenComponents(message.components);
get = value7.get;
moduleValue3 = require(dependencyMap[79]);
value8 = Reflect.apply(get, value7, [moduleValue3.asComponentId(componentId)]);
if (value8 != null) {
moduleValue4 = require(dependencyMap[155]);
value9 = moduleValue4.getParents(message.components, value8);
r6 = value9 == null ? value2 : value9[0];
type = r6 == null ? value2 : r6.type;
object = {channelId: id, guildId: guildId, containerId: messageId,
labelComponent: type !== ComponentType.LABEL ? value2 : r6};
object.allowEmpty = require(dependencyMap[155]).canSelectBeEmpty(value8, 'message');
object.onSubmit = onSubmit_86851;
type = value8.type;
if (ComponentType.STRING_SELECT === type) {
defaultImport3 = importDefault(dependencyMap[55]);
openLazy = defaultImport3.openLazy;
value = require(dependencyMap[43]);
value = value(dependencyMap[159], dependencyMap.paths);
value12 = 'StringSelectComponentActionSheet:' + messageId;
object4 = {selectionActionComponent: value8};
copyDataProperties(object4, object, undefined);
Reflect.apply(openLazy, defaultImport3, [value, value12, object4]);
} else if (ComponentType.USER_SELECT === type) {
defaultImport2 = importDefault(dependencyMap[55]);
openLazy = defaultImport2.openLazy;
value = require(dependencyMap[43]);
value = value(dependencyMap[160], dependencyMap.paths);
value11 = 'MentionableSelectComponentActionSheet:' + messageId;
object3 = {selectionActionComponent: value8};
copyDataProperties(object3, object, undefined);
Reflect.apply(openLazy, defaultImport2, [value, value11, object3]);
} else if (ComponentType.ROLE_SELECT === type) {
defaultImport2 = importDefault(dependencyMap[55]);
openLazy = defaultImport2.openLazy;
value = require(dependencyMap[43]);
value = value(dependencyMap[160], dependencyMap.paths);
value11 = 'MentionableSelectComponentActionSheet:' + messageId;
object3 = {selectionActionComponent: value8};
copyDataProperties(object3, object, undefined);
Reflect.apply(openLazy, defaultImport2, [value, value11, object3]);
} else if (ComponentType.MENTIONABLE_SELECT === type) {
defaultImport2 = importDefault(dependencyMap[55]);
openLazy = defaultImport2.openLazy;
value = require(dependencyMap[43]);
value = value(dependencyMap[160], dependencyMap.paths);
value11 = 'MentionableSelectComponentActionSheet:' + messageId;
object3 = {selectionActionComponent: value8};
copyDataProperties(object3, object, undefined);
Reflect.apply(openLazy, defaultImport2, [value, value11, object3]);
} else if (ComponentType.CHANNEL_SELECT === type) {
defaultImport = importDefault(dependencyMap[55]);
openLazy = defaultImport.openLazy;
value = require(dependencyMap[43]);
value = value(dependencyMap[161], dependencyMap.paths);
value10 = 'ChannelSelectComponentActionSheet:' + messageId;
object2 = {selectionActionComponent: value8};
copyDataProperties(object2, object, undefined);
Reflect.apply(openLazy, defaultImport, [value, value10, object2]);
}
}
}
return value2;
function handleTapSelectActionComponentOnSubmit(a0) { // fn#86851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:30924, owner: MessagesHandlers.handleTapSelectActionComponent.onSubmit, offset: 0x01fa4809, size: 135 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__.__proto__;
(InteractionUtilsModule).executeMessageComponentInteraction({componentType: env0_5.type,
messageId: messageId, messageFlags: flags, customId: env0_5.customId, componentId: env0_5.id,
applicationId: env0_2, channelId: id, guildId: env0_4, localState: a0});
}
}
function handleTapWelcomeReply(a0) { // fn#86852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:31749, owner: MessagesHandlers.handleTapWelcomeReply, offset: 0x01fa4890, size: 193 bytes, params: 2, frame: 18
var messageChannel;
var message;
const value = environment.__proto__.__proto__;
const {messageId,
stickerId} = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const messageData = env0_0.getMessageData(messageId);
if (messageData != null) {
messageChannel = messageData.messageChannel;
message = messageData.message;
if (message.type === MessageTypes.USER_JOIN) {
(require(8244) /* metro dependency 8244: WelcomeCTAUtils */).handleWelcomeCtaClicked(messageChannel,
message,
stickerId);
} else if (message.type === MessageTypes.ROLE_SUBSCRIPTION_PURCHASE) {
(require(11444) /* metro dependency 11444: GuildRoleSubscriptionSystemMessageUtils */).handleRoleSubscriptionPurchaseSystemMessageCtaClicked(messageChannel,
message, stickerId);
}
}
}
function handleTapInviteToSpeak(a0) { // fn#86853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:32103, owner: MessagesHandlers.handleTapInviteToSpeak, offset: 0x01fa4951, size: 187 bytes, params: 2, frame: 19
var messageChannel;
var message;
var moduleValue2;
var setUserSuppress;
var id;
var deleteMessage;
let value = environment.__proto__.__proto__;
const getNativeSyntheticEventData = MessageDataSnowflakeUtilsModule.getNativeSyntheticEventData;
const messageData = env0_0.getMessageData(Reflect.apply(getNativeSyntheticEventData,
MessageDataSnowflakeUtilsModule, [a0]).messageId);
if (messageData != null) {
messageChannel = messageData.messageChannel;
message = messageData.message;
if (message.type === MessageTypes.STAGE_RAISE_HAND) {
moduleValue2 = require(8118) /* metro dependency 8118: StageChannelActionCreators */;
setUserSuppress = moduleValue2.setUserSuppress;
id = message.author.id;
Reflect.apply(setUserSuppress, moduleValue2, [messageChannel, id, false]);
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
deleteMessage = value.deleteMessage;
id = messageChannel.id;
Reflect.apply(deleteMessage, value, [id, message.id, true]);
}
}
}
function handleTapAutoModerationActions(a0) { // fn#86854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:32387, owner: MessagesHandlers.handleTapAutoModerationActions, offset: 0x01fa4a0c, size: 638 bytes, params: 2, frame: 23
var messageData;
var message;
var messageChannel;
var moduleValue2;
var id;
var channel;
var guildStoreBinding;
var value7;
var moduleValue3;
var moduleValue4;
var guildMemberStoreBinding;
var defaultImport;
var open;
var object;
const intl = require(dependencyMap[51]).intl;
const t = require(dependencyMap[51]).t;
var guildIncidentsStoreBinding;
var getGuildIncident;
var value8;
let value = environment.__proto__.__proto__;
const value2 = undefined;
const {messageId, channelId} = require(dependencyMap[44]).getNativeSyntheticEventData(a0);
const binding = env0_0;
if (!binding.isModalOrActionsheetObstructing()) {
messageData = env0_0.getMessageData(messageId);
if (messageData != null) {
message = messageData.message;
messageChannel = messageData.messageChannel;
moduleValue2 = require(dependencyMap[90]);
if (moduleValue2.isAutomodMessageRecord(message)) {
id = messageChannel.id;
if (id === channelId) {
channel = ChannelStore.getChannel(channelId);
guildStoreBinding = GuildStore;
value7 = guildStoreBinding.getGuild(channel == null ? value2 : channel.guild_id);
if (value7 != null) {
moduleValue3 = require(dependencyMap[90]);
if (moduleValue3.isAutomodMessageRecord(message)) {
moduleValue4 = require(dependencyMap[90]);
if (moduleValue4.isAutomodNotification(message)) {
guildIncidentsStoreBinding = GuildIncidentsStore;
getGuildIncident = guildIncidentsStoreBinding.getGuildIncident;
id = value7.id;
value8 = Reflect.apply(getGuildIncident, guildIncidentsStoreBinding, [id]);
object = {};
object.source = require(dependencyMap[165]).GuildIncidentActionSources.MESSAGE;
object.alertType = require(dependencyMap[166]).getIncidentAlertType(value8);
id = message.id;
object.messageId = id;
value = importDefault(dependencyMap[55]);
value.openLazy(require(dependencyMap[43])(dependencyMap[167], dependencyMap.paths),
'GuildIncidentActionsActionSheet', {guild: value7, analyticsData: object});
} else {
guildMemberStoreBinding = GuildMemberStore;
if (guildMemberStoreBinding.isMember(value7.id, message.author.id)) {
importDefault(dependencyMap[168])({user: message.author, guild: value7});
} else {
defaultImport = importDefault(dependencyMap[151]);
open = defaultImport.open;
object = {key: 'GUILD_AUTOMOD_ERROR_MESSAGE_NOT_MEMBER'};
object.content = intl.string(t.UsD2YP);
object.icon = importDefault(dependencyMap[153]);
Reflect.apply(open, defaultImport, [object]);
}
}
} else {
guildMemberStoreBinding = GuildMemberStore;
if (guildMemberStoreBinding.isMember(value7.id, message.author.id)) {
importDefault(dependencyMap[168])({user: message.author, guild: value7});
} else {
defaultImport = importDefault(dependencyMap[151]);
open = defaultImport.open;
object = {key: 'GUILD_AUTOMOD_ERROR_MESSAGE_NOT_MEMBER'};
object.content = intl.string(t.UsD2YP);
object.icon = importDefault(dependencyMap[153]);
Reflect.apply(open, defaultImport, [object]);
}
}
}
}
}
}
}
return value2;
}
function handleTapAutoModerationFeedback(a0) { // fn#86855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:33268, owner: MessagesHandlers.handleTapAutoModerationFeedback, offset: 0x01fa4c8a, size: 381 bytes, params: 2, frame: 21
var message;
var messageChannel;
var moduleValue2;
var channel;
var moduleValue3;
var moduleValue4;
var decisionId;
var content;
var defaultImport;
var openLazy;
let value = environment.__proto__.__proto__;
const {messageId, channelId} = require(dependencyMap[44]).getNativeSyntheticEventData(a0);
const messageData = env0_0.getMessageData(messageId);
if (messageData != null) {
message = messageData.message;
messageChannel = messageData.messageChannel;
moduleValue2 = require(dependencyMap[90]);
if (moduleValue2.isAutomodMessageRecord(message)) {
if (messageChannel.id === channelId) {
channel = ChannelStore.getChannel(channelId);
if (channel != null) {
moduleValue3 = require(dependencyMap[90]);
if (moduleValue3.isAutomodMessageRecord(message)) {
moduleValue4 = require(dependencyMap[90]);
if (moduleValue4.isAutomodNotification(message)) {
defaultImport = importDefault(dependencyMap[55]);
openLazy = defaultImport.openLazy;
value = require(dependencyMap[43]);
value = value(dependencyMap[169], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'GuildRaidResolveActionSheet',
{guildId: channel.guild_id,
messageId: messageId}]);
} else {
value = require(dependencyMap[90]);
value = value.extractAutomodMessageFields(message);
decisionId = value.decisionId;
content = value.content;
value = require(dependencyMap[170]);
value.openSubmitFeedback(messageId, content, decisionId, channel);
}
} else {
value = require(dependencyMap[90]);
value = value.extractAutomodMessageFields(message);
decisionId = value.decisionId;
content = value.content;
value = require(dependencyMap[170]);
value.openSubmitFeedback(messageId, content, decisionId, channel);
}
}
}
}
}
}
function MessagesHandlersHandleTransitionToThread(a0, a1, a2) { // fn#86856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:33830, owner: MessagesHandlers.handleTransitionToThread, offset: 0x01fa4e07, size: 80 bytes, params: 4, frame: 14
const value = environment.__proto__.__proto__;
const channel = ChannelStore.getChannel(a1);
if (channel != null) {
(require(4601) /* metro dependency 4601: transitionToChannel */).transitionToThread(channel, {source: a2,
navigationReplace: false});
}
}
function handleTransitionToMessage(a0, a1, a2) { // fn#86857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:33967, owner: MessagesHandlers.handleTransitionToMessage, offset: 0x01fa4e57, size: 55 bytes, params: 4, frame: 16
const value = environment.__proto__.__proto__;
(TransitionToChannelModule).transitionToMessage(a1, a2,
{navigationReplace: false});
}
function handleTapFollowForumPost(a0) { // fn#86858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:34066, owner: MessagesHandlers.handleTapFollowForumPost, offset: 0x01fa4e8e, size: 128 bytes, params: 2, frame: 16
var messageChannel;
var moduleValue2;
var handleToggleFollowForumPost;
var joinedThreadsStoreBinding;
const {messageId,
channelId} = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const messageData = env0_0.getMessageData(messageId);
if (messageData != null) {
messageChannel = messageData.messageChannel;
moduleValue2 = require(9835) /* metro dependency 9835: MessagesUtils */;
handleToggleFollowForumPost = moduleValue2.handleToggleFollowForumPost;
joinedThreadsStoreBinding = JoinedThreadsStore;
Reflect.apply(handleToggleFollowForumPost, moduleValue2, [messageChannel,
joinedThreadsStoreBinding.hasJoined(channelId)]);
}
}
function handleCopyText({nativeEvent}) { // fn#86861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:34475, owner: MessagesHandlers.handleCopyText, offset: 0x01fa4f6b, size: 74 bytes, params: 2, frame: 14
const text = nativeEvent.text;
const value = environment.__proto__.__proto__;
(ClipboardUtilsNativeModule).copy(text);
(ToastUtilsModule).presentCopiedToClipboard();
}
function handleTapTag(a0) { // fn#86862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:34576, owner: MessagesHandlers.handleTapTag, offset: 0x01fa4fb5, size: 64 bytes, params: 2, frame: 12
let value = environment.__proto__.__proto__;
value = require(9834) /* metro dependency 9834: MessageDataSnowflakeUtils */;
const getNativeSyntheticEventData = value.getNativeSyntheticEventData;
env0_0.getMessageData(Reflect.apply(getNativeSyntheticEventData, value, [a0]).messageId);
}
function handleTapOpTag() { // fn#86863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:34680, owner: MessagesHandlers.handleTapOpTag, offset: 0x01fa4ff5, size: 113 bytes, params: 1, frame: 17
const defaultImport = ToastActionCreators;
const open = defaultImport.open;
const object = {};
object.key = 'FORUM_OP-' + env0_0.params.selectedChannelId;
const getForumOriginalPoster = (ForumOriginalPosterModule).getForumOriginalPoster;
object.content = getForumOriginalPoster;
Reflect.apply(open, defaultImport, [object]);
}
function handleMediaAttachmentPlaybackStarted(a0) { // fn#86864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:34835, owner: MessagesHandlers.handleMediaAttachmentPlaybackStarted, offset: 0x01fa5066, size: 299 bytes, params: 2, frame: 24
var environment;
var r10;
let value = environment.__proto__.__proto__;
const value2 = undefined;
const nativeSyntheticEventData = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const messageId = nativeSyntheticEventData.messageId;
const totalDurationSecs = nativeSyntheticEventData.totalDurationSecs;
const startDurationSecs = nativeSyntheticEventData.startDurationSecs;
const isVoiceMessage = nativeSyntheticEventData.isVoiceMessage;
const messageData = nativeSyntheticEventData.attachmentId.getMessageData(messageId);
if (messageData != null) {
if (value2 === isVoiceMessage) {
value = require(11465) /* metro dependency 11465: VoiceMessageAnalytics */;
value.logVoiceMessagePlaybackStarted(messageId, totalDurationSecs, startDurationSecs,
messageData.message.author.id);
return value2;
}
if (isVoiceMessage) {
value = require(11465) /* metro dependency 11465: VoiceMessageAnalytics */;
value.logVoiceMessagePlaybackStarted(messageId, totalDurationSecs, startDurationSecs,
messageData.message.author.id);
return value2;
}
var contentMessage = messageData.message.getContentMessage();
r10 = contentMessage == null ? value2 : contentMessage.attachments.find(function({id}) {
return id === attachmentId;
});
if (r10 == null) {
return value2;
}
value = require(11466) /* metro dependency 11466: MediaAnalytics */;
value.logMediaAttachmentPlaybackStarted(messageData.messageChannel, r10, totalDurationSecs, messageId,
startDurationSecs, messageData.message.author.id);
}
return value2;
}
function handleMediaAttachmentPlaybackEnded(a0) { // fn#86866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:35344, owner: MessagesHandlers.handleMediaAttachmentPlaybackEnded, offset: 0x01fa5191, size: 304 bytes, params: 2, frame: 25
var environment;
var r10;
let value = environment.__proto__.__proto__;
const value2 = undefined;
const nativeSyntheticEventData = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const messageId = nativeSyntheticEventData.messageId;
const totalDurationSecs = nativeSyntheticEventData.totalDurationSecs;
const endDurationSecs = nativeSyntheticEventData.endDurationSecs;
const durationListeningSecs = nativeSyntheticEventData.durationListeningSecs;
const isVoiceMessage = nativeSyntheticEventData.isVoiceMessage;
const messageData = nativeSyntheticEventData.attachmentId.getMessageData(messageId);
if (messageData != null) {
if (value2 === isVoiceMessage) {
value = require(11465) /* metro dependency 11465: VoiceMessageAnalytics */;
value.logVoiceMessagePlaybackEnded(messageId, totalDurationSecs, endDurationSecs,
messageData.message.author.id,
durationListeningSecs);
return value2;
}
if (isVoiceMessage) {
value = require(11465) /* metro dependency 11465: VoiceMessageAnalytics */;
value.logVoiceMessagePlaybackEnded(messageId, totalDurationSecs, endDurationSecs,
messageData.message.author.id,
durationListeningSecs);
return value2;
}
var contentMessage = messageData.message.getContentMessage();
r10 = contentMessage == null ? value2 : contentMessage.attachments.find(function({id}) {
return id === attachmentId;
});
if (r10 == null) {
return value2;
}
value = require(11466) /* metro dependency 11466: MediaAnalytics */;
value.logMediaAttachmentPlaybackEnded(messageId, totalDurationSecs, endDurationSecs,
messageData.message.author.id,
durationListeningSecs, r10);
}
return value2;
}
function handleVoiceMessagePlaybackFailed(a0) { // fn#86868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:35858, owner: MessagesHandlers.handleVoiceMessagePlaybackFailed, offset: 0x01fa52c1, size: 222 bytes, params: 2, frame: 19
const {messageId,
errorMessage} = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const value3 = null;
VoiceMessageAnalyticsModule.logVoiceMessagePlaybackFailed(messageId, value3 != errorMessage ? errorMessage : value3);
const defaultImport = ToastActionCreators;
const open = defaultImport.open;
const object = {};
object.key = 'AUDIO_PLAYBACK_FAILED-' + messageId;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gRHMh8);
object.icon = importDefault(9836) /* metro dependency 9836 */;
Reflect.apply(open, defaultImport, [object]);
}
function _fun86869() { // fn#86869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:36143, offset: 0x01fa539f, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_7(_fun86871);
return _fun86872;
function* _fun86871(a0) { // fn#86871, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:36163, offset: 0x01fa53ce, size: 347 bytes, params: 2, frame: 27
var id;
var r12;
var value10;
var canViewChannel;
var canViewChannel2;
var binding3;
var property;
var value11;
var startLurking;
var object;
var value12;
var value13;
var value14;
var error;
var value15;
var tryTransitionToThreadMessage;
if (false) {
return undefined;
}
value = undefined;
let binding = env4_0;
const {guildId, parentChannelId, threadId, messageId} = binding(env4_3[44]).getNativeSyntheticEventData(a0);
binding = env4_27;
const isMember = binding.isMember;
const currentUser = env4_38.getCurrentUser();
reducibleJoin3: while (true) {
if (currentUser == null) {
id = value;
break reducibleJoin3;
}
id = currentUser.id;
break reducibleJoin3;
}
const isMember2 = Reflect.apply(isMember, binding, [guildId, id]);
const channel = env4_24.getChannel(parentChannelId);
const value8 = env4_0(env4_3[89]);
const trackWithMetadata = value8.trackWithMetadata;
const MEDIA_POST_PREVIEW_EMBED_CLICKED = env4_45.MEDIA_POST_PREVIEW_EMBED_CLICKED;
let object2 = {media_post_id: threadId};
const value9 = channel != null;
reducibleJoin5: while (true) {
if (value9) {
binding = env4_0;
value10 = binding(env4_3[177]);
canViewChannel = value10.canViewChannel;
canViewChannel2 = Reflect.apply(canViewChannel, value10, [channel]);
r12 = canViewChannel2;
break reducibleJoin5;
}
r12 = value9;
break reducibleJoin5;
}
reduciblePort24: while (true) {
exceptionLanding22: while (true) {
object2.can_access = r12;
object2.is_member = isMember2;
Reflect.apply(trackWithMetadata, value8, [MEDIA_POST_PREVIEW_EMBED_CLICKED, object2]);
if (isMember2) {
binding = env4_0;
value15 = binding(env4_3[171]);
tryTransitionToThreadMessage = value15.tryTransitionToThreadMessage;
Reflect.apply(tryTransitionToThreadMessage, value15, [parentChannelId, threadId, messageId]);
break reduciblePort24;
}
try {
binding = env4_2;
} catch (error) {
break exceptionLanding22;
}
try {
binding3 = env4_3;
} catch (error) {
break exceptionLanding22;
}
try {
property = binding3[178];
} catch (error) {
break exceptionLanding22;
}
try {
value11 = binding(property);
} catch (error) {
break exceptionLanding22;
}
try {
startLurking = value11.startLurking;
} catch (error) {
break exceptionLanding22;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding22;
}
try {
object2.channelId = parentChannelId;
} catch (error) {
break exceptionLanding22;
}
try {
object = {};
} catch (error) {
break exceptionLanding22;
}
try {
value12 = Reflect.apply(startLurking, value11, [guildId, object, object2]);
} catch (error) {
break exceptionLanding22;
}
yield value12;
try {
value13 = undefined;
value14 = false;
} catch (error) {
break exceptionLanding22;
}
if (value14) {
return value13;
}
break reduciblePort24;
}
break reduciblePort24;
}
return value;
}
function _fun86872() { // fn#86872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:36629, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function handleTapDismissMediaPostSharePrompt(a0) { // fn#86873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:36717, owner: MessagesHandlers.handleTapDismissMediaPostSharePrompt, offset: 0x01fa5529, size: 100 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const getNativeSyntheticEventData = MessageDataSnowflakeUtilsModule.getNativeSyntheticEventData;
const messageId = Reflect.apply(getNativeSyntheticEventData, MessageDataSnowflakeUtilsModule, [a0]).messageId;
const dismissMediaPostSharePrompt = MediaChannelActionCreatorsModule.dismissMediaPostSharePrompt;
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
Reflect.apply(dismissMediaPostSharePrompt, MediaChannelActionCreatorsModule,
[value.castMessageIdAsChannelId(messageId)]);
}
function handleTapObscuredMediaLearnMore(a0) { // fn#86874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:36891, owner: MessagesHandlers.handleTapObscuredMediaLearnMore, offset: 0x01fa558d, size: 148 bytes, params: 2, frame: 20
let value = environment.__proto__.__proto__;
const {messageId, channelId, attachmentId, embedId} = require(dependencyMap[44]).getNativeSyntheticEventData(a0);
value = importDefault(dependencyMap[55]);
value.openLazy(require(dependencyMap[43])(dependencyMap[180], dependencyMap.paths), 'ExplicitMediaLearnMore',
{messageId: messageId, channelId: channelId, attachmentId: attachmentId, embedId: embedId});
}
function _fun86875() { // fn#86875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:37149, offset: 0x01fa5621, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_7(_fun86877);
return _fun86878;
function* _fun86877(a0) { // fn#86877, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:37169, offset: 0x01fa5650, size: 303 bytes, params: 2, frame: 20
var value6;
var value7;
var binding3;
var value11;
var showAgeVerificationGetStartedModal;
var object;
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
var binding = env4_0;
var binding2 = env4_3;
var nativeSyntheticEventData = binding(binding2[44]).getNativeSyntheticEventData(a0);
nativeSyntheticEventData.messageId;
nativeSyntheticEventData.channelId;
var isReveal = nativeSyntheticEventData.isReveal;
nativeSyntheticEventData.attachmentId;
nativeSyntheticEventData.embedId;
if (isReveal) {
if (binding(binding2[181]).shouldAgeVerifyForExplicitMedia()) {
binding = env4_0;
value6 = binding(env4_3[182]);
yield value6.maybePerformReactiveCheck();
value7 = undefined;
if (false) {
return value7;
}
if (!(value7 != null ? value7 === 'passed' : env4_11.getReactiveCheckPassed())) {
binding = env4_1;
binding3 = env4_3;
value11 = binding(binding3[183]);
showAgeVerificationGetStartedModal = value11.showAgeVerificationGetStartedModal;
object = {};
binding = env4_0;
object.entryPoint = binding(binding3[184]).AgeVerificationModalEntryPoint.OBSCURED_MEDIA;
Reflect.apply(showAgeVerificationGetStartedModal, value11, [object]);
}
binding = env4_0;
binding(env4_3[181]).trackToggleMediaObscurityV2({obscure: isReveal});
return undefined;
}
binding = env4_0;
binding(env4_3[181]).trackToggleMediaObscurityV2({obscure: isReveal});
} else {
value = env4_0(env4_3[181]);
value.trackToggleMediaObscurityV2({obscure: isReveal});
}
}
}
function _fun86878() { // fn#86878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:37626, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function handleTapSafetyPolicyNoticeEmbed(a0) { // fn#86879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:37710, owner: MessagesHandlers.handleTapSafetyPolicyNoticeEmbed, offset: 0x01fa577f, size: 119 bytes, params: 2, frame: 16
let value = environment.__proto__.__proto__;
const moduleValue = require(dependencyMap[44]);
const getNativeSyntheticEventData = moduleValue.getNativeSyntheticEventData;
const classificationId = Reflect.apply(getNativeSyntheticEventData, moduleValue, [a0]).classificationId;
value = importDefault(dependencyMap[137]);
value.pushLazy(require(dependencyMap[43])(dependencyMap[185], dependencyMap.paths),
{classificationId: classificationId, shouldRedirectToAccountStanding: true});
}
function handleTapSafetySystemNotificationCta({nativeEvent}) { // fn#86880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:37921, owner: MessagesHandlers.handleTapSafetySystemNotificationCta, offset: 0x01fa57f6, size: 193 bytes, params: 2, frame: 16
var defaultImport;
var pushLazy;
const ctaType = nativeEvent.ctaType;
const ctaKey = nativeEvent.ctaKey;
let value = environment.__proto__.__proto__;
const POLICY_VIOLATION_DETAIL = SafetySystemNotificationCtaType.POLICY_VIOLATION_DETAIL;
if (POLICY_VIOLATION_DETAIL === ctaType) {
if (ctaKey != null) {
defaultImport = importDefault(dependencyMap[137]);
pushLazy = defaultImport.pushLazy;
value = require(dependencyMap[43]);
value = value(dependencyMap[185], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {classificationId: ctaKey,
shouldRedirectToAccountStanding: true}]);
}
} else if (SafetySystemNotificationCtaType.LEARN_MORE_LINK === ctaType) {
if (ctaKey != null) {
importDefault(dependencyMap[102]).openURL(ctaKey);
}
}
}
function handleTapPollAnswer(a0) { // fn#86881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:38199, owner: MessagesHandlers.handleTapPollAnswer, offset: 0x01fa58b7, size: 96 bytes, params: 2, frame: 15
const binding = env0_0;
const replaceCorrectMessageParams = binding.replaceCorrectMessageParams;
const value = environment.__proto__.__proto__;
const value2 = Reflect.apply(replaceCorrectMessageParams, binding,
[MessageDataSnowflakeUtilsModule.castNativeSyntheticEventData(a0)]);
if (value2 != null) {
(importDefault(11197) /* metro dependency 11197: PollsActionCreators */).handlePollAnswerTapped(value2);
}
}
function handleTapPollSubmitVote(a0) { // fn#86882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:38359, owner: MessagesHandlers.handleTapPollSubmitVote, offset: 0x01fa5917, size: 96 bytes, params: 2, frame: 15
const binding = env0_0;
const replaceCorrectMessageParams = binding.replaceCorrectMessageParams;
const value = environment.__proto__.__proto__;
const value2 = Reflect.apply(replaceCorrectMessageParams, binding,
[MessageDataSnowflakeUtilsModule.castNativeSyntheticEventData(a0)]);
if (value2 != null) {
(importDefault(11197) /* metro dependency 11197: PollsActionCreators */).handlePollSubmitVote(value2);
}
}
function handleTapPollAction(a0) { // fn#86883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:38513, owner: MessagesHandlers.handleTapPollAction, offset: 0x01fa5977, size: 96 bytes, params: 2, frame: 15
const binding = env0_0;
const replaceCorrectMessageParams = binding.replaceCorrectMessageParams;
const value = environment.__proto__.__proto__;
const value2 = Reflect.apply(replaceCorrectMessageParams, binding,
[MessageDataSnowflakeUtilsModule.castNativeSyntheticEventData(a0)]);
if (value2 != null) {
(importDefault(11197) /* metro dependency 11197: PollsActionCreators */).handlePollActionTapped(value2);
}
}
function handleLongPressPollImage(a0) { // fn#86884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:38674, owner: MessagesHandlers.handleLongPressPollImage, offset: 0x01fa59d7, size: 242 bytes, params: 2, frame: 20
var message;
var messageChannel;
var moduleValue2;
var value;
let binding = env0_0;
const replaceCorrectMessageParams = binding.replaceCorrectMessageParams;
const value3 = Reflect.apply(replaceCorrectMessageParams, binding,
[MessageDataSnowflakeUtilsModule.castNativeSyntheticEventData(a0)]);
var env0_0 = value3;
if (value3 != null) {
binding = env0_0;
value = binding.getMessageData(value3.messageId);
if (value != null) {
message = value.message;
messageChannel = value.messageChannel;
value = message.attachments.findIndex(_fun86885);
if (value != null) {
moduleValue2 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
(require(9544) /* metro dependency 9544: openMediaModal */).openMediaModal({initialSources: moduleValue2.extractMediaSourcesFromMessage(message,
message, messageChannel.guild_id), initialIndex: value, originViewOrOriginLayout: value3.layout,
analyticsSource: 'Channel', channelId: messageChannel.id});
}
}
}
function _fun86885({id}) { // fn#86885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:38884, offset: 0x01fa5ac9, size: 27 bytes, params: 2, frame: 2
return id === env0_0.attachmentId;
}
}
function handleTapCtaButton(a0) { // fn#86886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:39149, owner: MessagesHandlers.handleTapCtaButton, offset: 0x01fa5ae4, size: 266 bytes, params: 2, frame: 20
var defaultImport;
var showAgeVerificationGetStartedModal;
var object;
let value = environment.__proto__.__proto__;
const {messageId, channelId,
callback} = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const CtaButtonType = (CtaButtonUtilsModule).CtaButtonType;
const MARK_AS_FALSE_POSITIVE = CtaButtonType.MARK_AS_FALSE_POSITIVE;
if (MARK_AS_FALSE_POSITIVE === callback) {
(require(8006) /* metro dependency 8006: ExplicitMediaActionCreatorsNative */).handleSenderFalsePositiveFlow(channelId,
messageId);
} else if (CtaButtonType.AGE_VERIFICATION_RETRY === callback) {
defaultImport = importDefault(5263) /* metro dependency 5263: AgeVerificationActionCreatorsNative */;
showAgeVerificationGetStartedModal = defaultImport.showAgeVerificationGetStartedModal;
object = {};
object.entryPoint = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).AgeVerificationModalEntryPoint.SYSTEM_DM_RETRY_BUTTON;
Reflect.apply(showAgeVerificationGetStartedModal, defaultImport, [object]);
value = require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */;
value.trackAgeVerificationDmClicked((require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).AgeVerificationDmCta.RETRY,
channelId);
}
}
function handleMessageAccessibilityAction(a0) { // fn#86887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:39644, owner: MessagesHandlers.handleMessageAccessibilityAction, offset: 0x01fa5bee, size: 777 bytes, params: 2, frame: 25
var id;
var author;
var channelStoreBinding;
var value6;
const MessageAccessibilityAction = (MessageAccessibilityActionsModule).MessageAccessibilityAction;
var object;
var moduleValue3;
var showLongPressMessageActionSheet;
var userStoreBinding;
let value = environment.__proto__.__proto__;
const value2 = undefined;
const getNativeSyntheticEventData = MessageDataSnowflakeUtilsModule.getNativeSyntheticEventData;
const messageId = Reflect.apply(getNativeSyntheticEventData, MessageDataSnowflakeUtilsModule, [a0]).messageId;
const messageAccessibilityActionFromLabel = (MessageAccessibilityActionsModule).getMessageAccessibilityActionFromLabel(a0.nativeEvent.action);
const {getMessage, chatInputRef} = env0_0.params;
const message = getMessage(messageId);
if (message != null) {
channelStoreBinding = ChannelStore;
value6 = channelStoreBinding.getChannel(message.channel_id);
if (MessageAccessibilityAction.VIEW_PROFILE === messageAccessibilityActionFromLabel) {
author = message == null ? value2 : message.author;
if (author != null) {
value = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
object = {};
id = author.id;
object.userId = id;
id = value6 == null ? value2 : value6.id;
object.channelId = id;
object.messageId = messageId;
value(object);
}
} else if (MessageAccessibilityAction.REPLY === messageAccessibilityActionFromLabel) {
if (value6 != null) {
(importDefault(11172) /* metro dependency 11172: replyToMessage */)({message: message, channel: value6,
chatInputRef: chatInputRef, actionSource: 'a11y_action'});
}
} else if (MessageAccessibilityAction.ADD_REACTION === messageAccessibilityActionFromLabel) {
if (value6 != null) {
value = require(9837) /* metro dependency 9837: ReactionUtils */;
value.handleAddNewReactions(value6, message.id);
}
} else if (MessageAccessibilityAction.MESSAGE_ACTIONS_MENU === messageAccessibilityActionFromLabel) {
if (value6 != null) {
moduleValue3 = require(11401) /* metro dependency 11401: showLongPressMessageActionSheet */;
showLongPressMessageActionSheet = moduleValue3.showLongPressMessageActionSheet;
object = {channel: value6, message: message};
object.canAddNewReactions = (importDefault(11419) /* metro dependency 11419: canAddNewReactions */)(value6);
userStoreBinding = UserStore;
object.user = userStoreBinding.getUser(message == null || message.author == null ? value2 : message.author.id);
object.chatInputRef = env0_0.params.chatInputRef;
Reflect.apply(showLongPressMessageActionSheet, moduleValue3, [object]);
}
} else if (MessageAccessibilityAction.ADD_QUICK_REACTION === messageAccessibilityActionFromLabel) {
if (value6 != null) {
(require(8217) /* metro dependency 8217: DoubleTapToReactUtils */).handleAddDefaultDoubleTapReaction(message,
value6);
}
} else if (MessageAccessibilityAction.EDIT_GDM === messageAccessibilityActionFromLabel) {
if (value6 != null) {
(importDefault(9879) /* metro dependency 9879: showChatGDMCustomizeActionSheet */)({channelId: value6.id});
}
}
}
return value2;
}
function handleTapForwardFooter(a0) { // fn#86888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:40815, owner: MessagesHandlers.handleTapForwardFooter, offset: 0x01fa5ef7, size: 101 bytes, params: 2, frame: 13
const message = env0_0.params.getMessage((MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0).messageId);
if (message != null) {
(importDefault(11504) /* metro dependency 11504: handleForwardBreadcrumb */)(message);
}
}
function handleTapInlineForward(a0) { // fn#86889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:40954, owner: MessagesHandlers.handleTapInlineForward, offset: 0x01fa5f5c, size: 293 bytes, params: 2, frame: 21
var r4;
var inlineForwardOptions;
var Object;
var length;
var nativeEvent;
var moduleValue3;
var openForwardModal;
var object;
let value = environment.__proto__.__proto__;
const value2 = undefined;
const nativeSyntheticEventData = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const message = env0_0.params.getMessage(nativeSyntheticEventData.messageId);
if (message != null) {
inlineForwardOptions = (require(11505) /* metro dependency 11505: getInlineForwardOptions */).getInlineForwardOptions(message,
nativeSyntheticEventData);
if (inlineForwardOptions != null) {
Object = global.Object;
length = Object.keys(inlineForwardOptions).length;
nativeEvent = a0.nativeEvent;
if (nativeEvent.triggerHaptic) {
moduleValue3 = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue3.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
}
value = require(9591) /* metro dependency 9591: ForwardModalUtils */;
openForwardModal = value.openForwardModal;
object = {message: message};
nativeEvent = a0.nativeEvent;
r4 = nativeEvent.location ?? 'inline-button';
object.source = r4;
r4 = length === 0 ? value2 : inlineForwardOptions;
object.forwardOptions = r4;
Reflect.apply(openForwardModal, value, [object]);
}
}
return value2;
}
function handleTapClanTagChiplet(a0) { // fn#86891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:41472, owner: MessagesHandlers.handleTapClanTagChiplet, offset: 0x01fa60bf, size: 169 bytes, params: 2, frame: 18
var guildId;
var defaultImport;
var openLazy;
var value5;
let value = environment.__proto__.__proto__;
const nativeSyntheticEventData = require(dependencyMap[44]).getNativeSyntheticEventData(a0);
if (nativeSyntheticEventData != null && nativeSyntheticEventData.guildId != null) {
defaultImport = importDefault(dependencyMap[55]);
openLazy = defaultImport.openLazy;
value = require(dependencyMap[43]);
value = value(dependencyMap[73], dependencyMap.paths);
guildId = nativeSyntheticEventData.guildId;
value5 = 'GuildProfileActionSheet:' + guildId;
guildId = nativeSyntheticEventData.guildId;
Reflect.apply(openLazy, defaultImport, [value, value5, {guildId: guildId}]);
}
}
function handleTapContentInventoryEntryEmbed(a0) { // fn#86892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:41692, owner: MessagesHandlers.handleTapContentInventoryEntryEmbed, offset: 0x01fa6168, size: 160 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__;
const nativeSyntheticEventData = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const messageId = nativeSyntheticEventData.messageId;
const value3 = env2_6(nativeSyntheticEventData, env2_4);
const getMessage = env0_0.params.getMessage;
const message = getMessage(messageId);
if (message != null) {
(require(11509) /* metro dependency 11509: ContentInventoryActionCreators */).onTapContentInventoryEntryEmbed({message: message,
authorId: value3.authorId, contentId: value3.contentId, tappedElement: value3.tappedElement});
}
}
function handleTapCheckpointCard(a0) { // fn#86893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:41963, owner: MessagesHandlers.handleTapCheckpointCard, offset: 0x01fa6208, size: 138 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__;
const nativeSyntheticEventData = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const messageId = nativeSyntheticEventData.messageId;
const value3 = env2_6(nativeSyntheticEventData, env2_5);
const getMessage = env0_0.params.getMessage;
const message = getMessage(messageId);
if (message != null) {
(require(11512) /* metro dependency 11512: onTapCheckpointCard */).onTapCheckpointCard({message: message,
authorId: value3.authorId});
}
}
function MessagesHandlersHandleTapAppMessageEmbed(a0) { // fn#86894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:42171, owner: MessagesHandlers.handleTapAppMessageEmbed, offset: 0x01fa6292, size: 128 bytes, params: 2, frame: 15
var handleTapAppMessageEmbed;
var object;
let value = environment.__proto__.__proto__;
const nativeSyntheticEventData = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const getMessage = env0_0.params.getMessage;
const message = getMessage(nativeSyntheticEventData.messageId);
if (message != null) {
value = require(10536) /* metro dependency 10536: createAppMessageEmbed */;
handleTapAppMessageEmbed = value.handleTapAppMessageEmbed;
object = {};
copyDataProperties(object, nativeSyntheticEventData, message);
object['message'] = message;
Reflect.apply(handleTapAppMessageEmbed, value, [object]);
}
}
function handleTapPreviewSharedClientTheme(a0) { // fn#86895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:42365, owner: MessagesHandlers.handleTapPreviewSharedClientTheme, offset: 0x01fa6312, size: 128 bytes, params: 2, frame: 15
var handleTapPreviewSharedClientTheme;
var object;
let value = environment.__proto__.__proto__;
const nativeSyntheticEventData = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const getMessage = env0_0.params.getMessage;
const message = getMessage(nativeSyntheticEventData.messageId);
if (message != null) {
value = require(11513) /* metro dependency 11513: previewSharedClientTheme */;
handleTapPreviewSharedClientTheme = value.handleTapPreviewSharedClientTheme;
object = {};
copyDataProperties(object, nativeSyntheticEventData, message);
object['message'] = message;
Reflect.apply(handleTapPreviewSharedClientTheme, value, [object]);
}
}
function handleSharedClientThemeViewed(a0) { // fn#86896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:42564, owner: MessagesHandlers.handleSharedClientThemeViewed, offset: 0x01fa6392, size: 128 bytes, params: 2, frame: 15
var handleSharedClientThemeViewed;
var object;
let value = environment.__proto__.__proto__;
const nativeSyntheticEventData = (MessageDataSnowflakeUtilsModule).getNativeSyntheticEventData(a0);
const getMessage = env0_0.params.getMessage;
const message = getMessage(nativeSyntheticEventData.messageId);
if (message != null) {
value = require(11516) /* metro dependency 11516: sharedClientThemeViewed */;
handleSharedClientThemeViewed = value.handleSharedClientThemeViewed;
object = {};
copyDataProperties(object, nativeSyntheticEventData, message);
object['message'] = message;
Reflect.apply(handleSharedClientThemeViewed, value, [object]);
}
}
}
function value_86898(a0) { // fn#86898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11533:42823, offset: 0x01fa6421, size: 272 bytes, params: 2, frame: 20
var r1;
var type;
var value3;
var id;
var channel_id;
var object;
var messageReference;
var messageStoreBinding;
var handleLongPressMessage;
var object2;
const getMessage = this.params.getMessage;
const nativeEvent = a0.nativeEvent;
const messageId = nativeEvent.messageId;
const value = undefined;
const message = getMessage(messageId);
if (message != null) {
type = message.type;
value3 = environment.__proto__;
if (type === MessageTypes.THREAD_STARTER_MESSAGE) {
messageReference = message.messageReference;
if (messageReference == null) {
return value;
}
messageStoreBinding = MessageStore;
if (messageStoreBinding.getMessage(messageReference.channel_id, messageReference.message_id) != null) {
object = {};
copyDataProperties(object, nativeEvent, undefined);
object['messageId'] = messageReference.message_id;
object['channelId'] = messageReference.channel_id;
r1 = object;
} else {
handleLongPressMessage = this.handleLongPressMessage;
object = {};
copyDataProperties(object, a0, undefined);
object2 = {};
copyDataProperties(object2, nativeEvent, undefined);
object2['mediaIndex'] = 0;
object2['mediaType'] = '';
object['nativeEvent'] = object2;
Reflect.apply(handleLongPressMessage, this, [object]);
r1 = value;
}
return r1;
}
id = message.id;
channel_id = message.channel_id;
object = {};
copyDataProperties(object, nativeEvent, id);
object['messageId'] = id;
object['channelId'] = channel_id;
return object;
}
return value;
}
}
}
global.__d(_fun86761, 11347, [29, 5, 57, 6, 7, 5261, 4234, 6773, 10906, 4117, 8326, 7093, 4833, 9865, 3786, 5221,
1226, 1379, 4645, 8450, 1945, 1867, 4097, 6877, 4814, 3784, 4396, 1934, 3969, 6876, 7223, 1878, 4503, 8178, 661,
1346, 4118, 1880, 5267, 1243, 6789, 9877, 11348, 1962, 9834, 11349, 11379, 11380, 8214, 7709, 6802, 1244, 8850,
9759, 8769, 4080, 8776, 5068, 11395, 9875, 4093, 4116, 9876, 9874, 9835, 9837, 11065, 477, 8296, 6860, 11017,
8294, 11396, 9300, 8743, 21, 11398, 11399, 9864, 4633, 11401, 11419, 4081, 4082, 11172, 1230, 11005, 5260, 6522,
4863, 5051, 8217, 11420, 10216, 1391, 10588, 10259, 10592, 10593, 11421, 10265, 10656, 3853, 10599, 10794,
11328, 4098, 9052, 7147, 1581, 7091, 9480, 6533, 9484, 7120, 4101, 9856, 9857, 8879, 10437, 6947, 9318, 11422,
10558, 4105, 11430, 8870, 683, 5072, 5087, 8113, 4796, 8581, 6823, 7882, 8953, 7360, 5080, 8454, 11431, 7040,
7007, 11432, 10381, 11433, 1583, 7067, 7076, 7165, 8742, 480, 3857, 11434, 9836, 11435, 4627, 1909, 4647, 8056,
11437, 11439, 11443, 8244, 11444, 8118, 8277, 8275, 11445, 11449, 11452, 11453, 4601, 6797, 3856, 11464, 11465,
11466, 4246, 6946, 11467, 11468, 4821, 4813, 5263, 5074, 11470, 11197, 9546, 9544, 10609, 8006, 8216, 9879,
11504, 11505, 9591, 11506, 11509, 11512, 10536, 11513, 11516,
2]) /* metro module 11347, dependencies: [29, 5, 57, 6, 7, 5261, 4234, 6773, 10906, 4117, 8326, 7093, 4833, 9865, 3786, 5221, 1226, 1379, 4645, 8450, 1945, 1867, 4097, 6877, 4814, 3784, 4396, 1934, 3969, 6876, 7223, 1878, 4503, 8178, 661, 1346, 4118, 1880, 5267, 1243, 6789, 9877, 11348, 1962, 9834, 11349, 11379, 11380, 8214, 7709, 6802, 1244, 8850, 9759, 8769, 4080, 8776, 5068, 11395, 9875, 4093, 4116, 9876, 9874, 9835, 9837, 11065, 477, 8296, 6860, 11017, 8294, 11396, 9300, 8743, 21, 11398, 11399, 9864, 4633, 11401, 11419, 4081, 4082, 11172, 1230, 11005, 5260, 6522, 4863, 5051, 8217, 11420, 10216, 1391, 10588, 10259, 10592, 10593, 11421, 10265, 10656, 3853, 10599, 10794, 11328, 4098, 9052, 7147, 1581, 7091, 9480, 6533, 9484, 7120, 4101, 9856, 9857, 8879, 10437, 6947, 9318, 11422, 10558, 4105, 11430, 8870, 683, 5072, 5087, 8113, 4796, 8581, 6823, 7882, 8953, 7360, 5080, 8454, 11431, 7040, 7007, 11432, 10381, 11433, 1583, 7067, 7076, 7165, 8742, 480, 3857, 11434, 9836, 11435, 4627, 1909, 4647, 8056, 11437, 11439, 11443, 8244, 11444, 8118, 8277, 8275, 11445, 11449, 11452, 11453, 4601, 6797, 3856, 11464, 11465, 11466, 4246, 6946, 11467, 11468, 4821, 4813, 5263, 5074, 11470, 11197, 9546, 9544, 10609, 8006, 8216, 9879, 11504, 11505, 9591, 11506, 11509, 11512, 10536, 11513, 11516, 2] */;