Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,45 @@
/* Metro module 11379; source: modules/messages/native/handlers/handleMessagesLongPressChannel.tsx; dependencies: [4800, 9862, 2] */
function _fun87227(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11565:6, offset: 0x01fb47cd, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/handlers/handleMessagesLongPressChannel.tsx');
exports.handleMessagesLongPressChannel = handleMessagesLongPressChannel;
}
function handleMessagesLongPressChannel({data}) { // fn#87228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11565:226, offset: 0x01fb4834, size: 137 bytes, params: 2, frame: 18
var r6;
var value;
const guildId = data.guildId;
const channelId = data.channelId;
const messageId = data.messageId;
const originalLink = data.originalLink;
if (channelId != null) {
if (originalLink != null) {
r6 = originalLink;
} else {
value = require(4800) /* metro dependency 4800: ChannelUtils */;
value = value.getChannelPermalink(guildId, channelId, messageId);
r6 = value;
}
if (r6 != null) {
(importDefault(9862) /* metro dependency 9862: showLongPressURLActionSheet */)({urlString: r6,
guildId: guildId,
channelId: channelId, messageId: messageId});
}
} else if (originalLink != null) {
if (originalLink != null) {
r6 = originalLink;
} else {
value = require(4800) /* metro dependency 4800: ChannelUtils */;
value = value.getChannelPermalink(guildId, channelId, messageId);
r6 = value;
}
if (r6 != null) {
(importDefault(9862) /* metro dependency 9862: showLongPressURLActionSheet */)({urlString: r6,
guildId: guildId,
channelId: channelId, messageId: messageId});
}
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,15 @@
/* Metro module 11395; source: modules/messages/native/handlers/handleMessagesTapGameMention.tsx; dependencies: [9959, 9963, 2] */
function _fun87325(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11581:6, offset: 0x01fb8956, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/handlers/handleMessagesTapGameMention.tsx');
exports.handleMessagesTapGameMention = function({gameId}) {
var defaultImport = importDefault(dependencyMap[0]);
var object = {gameId: gameId};
object.gameProfileModalChecks = {shouldOpenGameProfile: true, gameId: gameId};
object.source = require(dependencyMap[1]).GameProfileSources.GameMention;
defaultImport.openGameProfileModal(object);
};
}
@@ -0,0 +1,468 @@
/* Metro module 11348; source: modules/messages/native/handlers/handleMessagesTapImage.tsx; dependencies: [4833, 3793, 1878, 661, 9548, 9877, 679, 9546, 3853, 4633, 9544, 4805, 6647, 2] */
function _fun86899(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:6, offset: 0x01fa6531, size: 172 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const referencedMessageStore = importDefault(4833) /* metro dependency 4833: ReferencedMessageStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).MessageTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/handlers/handleMessagesTapImage.tsx');
exports.handleMessagesTapImage = handleMessagesTapImage;
}
function handleMessagesTapImage({tapImageData, allowWithinModal, message, messageChannel, selectedChannelId, showContextName}) { // fn#86900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:275, offset: 0x01fa65dd, size: 1476 bytes, params: 2, frame: 42
var environment;
var r17;
var r16;
var r26;
var r23;
var components;
var r6;
var r7;
var value2;
var moduleValue;
var markPortalAlive;
var moduleValue2;
var messageReference;
var getMessageByReference;
var message2;
var property;
var length;
var moduleValue3;
var extractMediaFromAttachment;
var guild_id;
var url;
var moduleValue4;
var value6;
var value7;
var moduleValue5;
var flattenSource;
var value8;
var accessoryType;
var mediaViewIndex;
var mediaIndex;
var value9;
var noCarousel;
var moduleValue6;
var setMediaSourcePortal;
var value10;
var object;
var moduleValue7;
var embeds;
var find;
var value11;
var moduleValue8;
var extractMediaSourcesFromComponent;
var moduleValue9;
var asComponentId;
var value12;
var sources;
var initialIndex;
var moduleValue10;
var moduleValue11;
var extractMediaSourcesFromEmbed;
var value13;
var binding;
var moduleValue12;
var some;
var value14;
var moduleValue13;
var openMediaModal;
var id;
var moduleValue14;
var computeChannelName;
var channelName;
var moduleValue15;
var getChannelIcon;
var value15;
var defaultImport;
var Error;
var concat;
const index = tapImageData.index;
const type2 = tapImageData.type;
const layout = tapImageData.layout;
const portal = tapImageData.portal;
const embedIndex = tapImageData.embedIndex;
const componentId = tapImageData.componentId;
const componentMediaIndex = tapImageData.componentMediaIndex;
const embedId = tapImageData.embedId;
const value = undefined;
reducibleJoin2: while (true) {
if (portal == null) {
break reducibleJoin2;
}
value2 = environment;
moduleValue = require(9548) /* metro dependency 9548: NativePortalView */;
markPortalAlive = moduleValue.markPortalAlive;
Reflect.apply(markPortalAlive, moduleValue, [portal]);
break reducibleJoin2;
}
if (allowWithinModal !== true) {
moduleValue2 = require(9877) /* metro dependency 9877: isAlertOrActionSheetOpen */;
reducibleJoin4: while (true) {
if (moduleValue2.isAlertOrActionSheetOpen(selectedChannelId)) {
return value;
}
break reducibleJoin4;
}
}
if (type2 !== 'attachment') {
reducibleJoin8: while (true) {
if (type2 === 'embed') {
break reducibleJoin8;
}
if (type2 === 'sticker') {
break reducibleJoin8;
}
if (type2 !== 'component') {
Error = global.Error;
concat = global.HermesInternal.concat;
throw new Error('Unsupported thumbnail type: ' + type2);
}
break reducibleJoin8;
}
}
let type = message.type;
const THREAD_STARTER_MESSAGE = MessageTypes.THREAD_STARTER_MESSAGE;
reducibleJoin11: while (true) {
if (type !== THREAD_STARTER_MESSAGE) {
r17 = message;
break reducibleJoin11;
}
messageReference = message.messageReference;
if (messageReference == null) {
r17 = message;
break reducibleJoin11;
}
getMessageByReference = ReferencedMessageStore.getMessageByReference;
messageReference = message.messageReference;
message2 = Reflect.apply(getMessageByReference, ReferencedMessageStore, [messageReference]).message;
if (message2 == null) {
r17 = message;
break reducibleJoin11;
}
r17 = message2;
break reducibleJoin11;
}
messageReference = r17.messageReference;
reducibleJoin13: while (true) {
if (messageReference == null) {
type = value;
break reducibleJoin13;
}
type = messageReference.type;
break reducibleJoin13;
}
const MessageReferenceTypes = (require(679) /* metro dependency 679: MessageReferenceTypes */).MessageReferenceTypes;
const FORWARD = MessageReferenceTypes.FORWARD;
if (type !== FORWARD) {
r16 = r17;
} else {
property = r17.messageSnapshots[0];
reducibleJoin16: while (true) {
if (property == null) {
message = value;
break reducibleJoin16;
}
message = property.message;
break reducibleJoin16;
}
reducibleJoin17: while (true) {
if (message == null) {
return value;
}
r16 = message;
break reducibleJoin17;
}
}
const value5 = r17.attachments.filter(_fun86901);
if (type2 === 'attachment') {
length = value5.length;
reducibleJoin22: while (true) {
if (index < length) {
property = value5[index];
moduleValue3 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
extractMediaFromAttachment = moduleValue3.extractMediaFromAttachment;
guild_id = messageChannel.guild_id;
if (Reflect.apply(extractMediaFromAttachment, moduleValue3, [property, r17, index, guild_id]) != null) {
break reducibleJoin22;
}
url = property.url;
if (url == null) {
break reducibleJoin22;
}
url = property.url;
if (url !== '') {
defaultImport = importDefault(3853) /* metro dependency 3853: Linking */;
defaultImport.openURL(property.url);
return value;
}
break reducibleJoin22;
}
break reducibleJoin22;
}
}
let env0_1 = -1;
if (type2 === 'embed') {
reducibleJoin24: while (true) {
if (embedIndex != null) {
embeds = r16.embeds;
property = embeds[index];
env0_1 = embedIndex;
moduleValue11 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
extractMediaSourcesFromEmbed = moduleValue11.extractMediaSourcesFromEmbed;
guild_id = messageChannel.guild_id;
value13 = Reflect.apply(extractMediaSourcesFromEmbed, moduleValue11, [r17, r16, property, index,
guild_id]);
binding = env0_1;
length = value13.length;
reducibleJoin51: while (true) {
if (binding < length) {
moduleValue12 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
setMediaSourcePortal = moduleValue12.setMediaSourcePortal;
Reflect.apply(setMediaSourcePortal, moduleValue12, [value13[env0_1], portal]);
r6 = value13;
break reducibleJoin51;
}
r6 = value13;
break reducibleJoin51;
}
some = r6.some;
value14 = Reflect.apply(some, r6, [_fun86904]);
reducibleJoin60: while (true) {
if (env0_1 === -1) {
break reducibleJoin60;
}
moduleValue13 = require(9544) /* metro dependency 9544: openMediaModal */;
openMediaModal = moduleValue13.openMediaModal;
object = {disableDownload: value14, initialSources: r6, initialIndex: env0_1,
originViewOrOriginLayout: layout,
analyticsSource: 'Channel'};
id = messageChannel.id;
object.channelId = id;
reducibleJoin54: while (true) {
if (showContextName) {
moduleValue14 = require(4805) /* metro dependency 4805: useChannelName */;
computeChannelName = moduleValue14.computeChannelName;
channelName = Reflect.apply(computeChannelName, moduleValue14, [messageChannel, UserStore,
RelationshipStore,
false]);
r7 = channelName;
break reducibleJoin54;
}
r7 = value;
break reducibleJoin54;
}
object.contextName = r7;
reducibleJoin56: while (true) {
if (showContextName) {
moduleValue15 = require(6647) /* metro dependency 6647: ChannelUtils */;
getChannelIcon = moduleValue15.getChannelIcon;
value15 = Reflect.apply(getChannelIcon, moduleValue15, [messageChannel]);
r7 = value15;
break reducibleJoin56;
}
r7 = value;
break reducibleJoin56;
}
object.contextIcon = r7;
Reflect.apply(openMediaModal, moduleValue13, [object]);
break reducibleJoin60;
}
return value;
}
break reducibleJoin24;
}
}
if (type2 === 'component') {
if (componentId == null) {
return null;
}
reducibleJoin42: while (true) {
reducibleJoin41: while (true) {
if (embedId == null) {
break reducibleJoin41;
}
if (embedId === '') {
break reducibleJoin41;
}
embeds = r16.embeds;
find = embeds.find;
value11 = Reflect.apply(find, embeds, [function({id}) {
return id === embedId;
}]);
reducibleJoin40: while (true) {
if (value11 == null) {
components = value;
break reducibleJoin40;
}
components = value11.components;
break reducibleJoin40;
}
break reducibleJoin42;
}
components = r16.components;
break reducibleJoin42;
}
reducibleJoin51: while (true) {
reducibleJoin47: while (true) {
if (components == null) {
break reducibleJoin47;
}
length = components.length;
if (length === 0) {
break reducibleJoin47;
}
moduleValue8 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
extractMediaSourcesFromComponent = moduleValue8.extractMediaSourcesFromComponent;
guild_id = messageChannel.guild_id;
moduleValue9 = require(4633) /* metro dependency 4633: InteractionComponentTypes */;
asComponentId = moduleValue9.asComponentId;
value12 = Reflect.apply(extractMediaSourcesFromComponent, moduleValue8, [r17, components, guild_id,
Reflect.apply(asComponentId, moduleValue9, [componentId]), componentMediaIndex]);
if (value12 == null) {
return value;
}
sources = value12.sources;
initialIndex = value12.initialIndex;
env0_1 = initialIndex;
moduleValue10 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
setMediaSourcePortal = moduleValue10.setMediaSourcePortal;
Reflect.apply(setMediaSourcePortal, moduleValue10, [sources[env0_1], portal]);
r6 = sources;
break reducibleJoin51;
}
return value;
}
} else {
moduleValue4 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
value6 = moduleValue4.extractMediaSourcesFromMessage(r17, r16, messageChannel.guild_id);
length = value6.length;
value7 = 0;
if (value7 < length) {
r26 = value7;
reducibleLoop26: while (true) {
moduleValue5 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
flattenSource = moduleValue5.flattenSource;
value8 = Reflect.apply(flattenSource, moduleValue5, [value6[r26]]);
if (value8 != null) {
accessoryType = value8.accessoryType;
reducibleJoin31: while (true) {
if (accessoryType !== type2) {
break reducibleJoin31;
}
mediaViewIndex = value8.mediaViewIndex;
reducibleJoin30: while (true) {
if (mediaViewIndex != null) {
r23 = mediaViewIndex;
break reducibleJoin30;
}
mediaIndex = value8.mediaIndex;
r23 = mediaIndex;
break reducibleJoin30;
}
if (r23 === index) {
noCarousel = value8.noCarousel;
if (noCarousel) {
property = value6[r26];
object = [property];
env0_1 = value7;
moduleValue7 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
setMediaSourcePortal = moduleValue7.setMediaSourcePortal;
Reflect.apply(setMediaSourcePortal, moduleValue7, [object[value7], portal]);
r6 = object;
} else {
env0_1 = r26;
moduleValue6 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
setMediaSourcePortal = moduleValue6.setMediaSourcePortal;
Reflect.apply(setMediaSourcePortal, moduleValue6, [value6[r26], portal]);
value10 = value6.filter(_fun86903);
r6 = value10;
}
break reducibleLoop26;
}
break reducibleJoin31;
}
}
value9 = typeof r26 === 'bigint' ? r26 + 1n : +r26 + 1;
length = value6.length;
if (value9 < length) {
r26 = value9;
continue reducibleLoop26;
}
r6 = value6;
break reducibleLoop26;
}
} else {
r6 = value6;
}
}
reducibleJoin60: while (true) {
if (env0_1 === -1) {
break reducibleJoin60;
}
moduleValue13 = require(9544) /* metro dependency 9544: openMediaModal */;
openMediaModal = moduleValue13.openMediaModal;
object = {disableDownload: r6.some(_fun86904), initialSources: r6, initialIndex: env0_1,
originViewOrOriginLayout: layout, analyticsSource: 'Channel'};
id = messageChannel.id;
object.channelId = id;
reducibleJoin54: while (true) {
if (showContextName) {
moduleValue14 = require(4805) /* metro dependency 4805: useChannelName */;
computeChannelName = moduleValue14.computeChannelName;
channelName = Reflect.apply(computeChannelName, moduleValue14, [messageChannel, UserStore,
RelationshipStore,
false]);
r7 = channelName;
break reducibleJoin54;
}
r7 = value;
break reducibleJoin54;
}
object.contextName = r7;
reducibleJoin56: while (true) {
if (showContextName) {
moduleValue15 = require(6647) /* metro dependency 6647: ChannelUtils */;
getChannelIcon = moduleValue15.getChannelIcon;
value15 = Reflect.apply(getChannelIcon, moduleValue15, [messageChannel]);
r7 = value15;
break reducibleJoin56;
}
r7 = value;
break reducibleJoin56;
}
object.contextIcon = r7;
Reflect.apply(openMediaModal, moduleValue13, [object]);
break reducibleJoin60;
}
return value;
}
function _fun86901(a0) { // fn#86901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:1051, offset: 0x01fa6ba1, size: 44 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = require(9546) /* metro dependency 9546: MediaSourceUtil */;
return !value.isThumbnailAttachment(a0);
}
function _fun86903(a0, a1) { // fn#86903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:2104, offset: 0x01fa6bcd, size: 96 bytes, params: 3, frame: 12
var binding;
let value = environment.__proto__;
value = require(9546) /* metro dependency 9546: MediaSourceUtil */;
value = value.flattenSource(a0);
const r0 = value != null && !value.noCarousel;
if (!r0 && env0_1 >= a1) {
binding = env0_1;
env0_1 = typeof binding === 'bigint' ? binding - 1n : +binding - 1;
}
return r0;
}
function _fun86904(a0) { // fn#86904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:2216, offset: 0x01fa6c2d, size: 59 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = require(9546) /* metro dependency 9546: MediaSourceUtil */;
value = value.flattenSource(a0, true);
return value != null && value.disableDownload;
}
@@ -0,0 +1,716 @@
/* Metro module 9874; source: modules/messages/native/handlers/handleMessagesTapLink.tsx; dependencies: [7861, 4234, 8183, 9865, 1885, 1379, 4097, 1878, 661, 1483, 1386, 9696, 5079, 1243, 9875, 4093, 4116, 9876, 8872, 9877, 8743, 4080, 9300, 1962, 4796, 8913, 4008, 9879, 9899, 7067, 6789, 8447, 1583, 9900, 4634, 1230, 8235, 9903, 9926, 2] */
function _fun77455(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10060:6, offset: 0x01dfc94b, size: 405 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = handleMessagesTapURLLink;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(7861) /* metro dependency 7861: ApplicationCommandIndexStore */).getSection;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const guildAutomodMessageStore = importDefault(8183) /* metro dependency 8183: GuildAutomodMessageStore */;
const summaryStore = importDefault(9865) /* metro dependency 9865: SummaryStore */;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const inviteStore = importDefault(4097) /* metro dependency 4097: InviteStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_11 = constantsModule.AnalyticsLocations;
const env0_12 = constantsModule.LinkingTypes;
const env0_13 = constantsModule.Routes;
const env0_14 = (require(1483) /* metro dependency 1483: AppLauncherNativeConstants */).AppLauncherRouteName;
const env0_15 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoute;
const env0_16 = (require(9696) /* metro dependency 9696: ChannelDetailsConstants */).ChannelDetailsNavigatorScreens;
const env0_17 = (require(5079) /* metro dependency 5079: PushNotificationConstants */).NotificationTypes;
const env0_18 = (require(1243) /* metro dependency 1243: ThreadConstants */).OpenThreadAnalyticsLocations;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/handlers/handleMessagesTapLink.tsx');
exports.handleMessagesTapURLLink = closure;
exports.handleMessagesTapLink = handleMessagesTapLink;
}
function handleMessagesTapURLLink(a0, a1) { // fn#77456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10060:420, offset: 0x01dfcae0, size: 393 bytes, params: 3, frame: 19
var r1;
var r2;
var r6;
var node;
var moduleValue;
var payload;
var value3;
var moduleValue2;
var moduleValue3;
var handleClick;
var object2;
var value6;
var moduleValue4;
let url = a0.url;
let value = url != null;
let r0 = value && a0.url !== '';
if (r0) {
url = a0.url;
node = a0.node;
value = false;
if (node == null) {
r2 = value;
} else {
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) {
r2 = value;
} else if (payload.inviteCode == null) {
r2 = value;
} else {
value = InviteStore.getInvite(payload.inviteCode);
value3 = value == null;
if (value3) {
r1 = value3;
} else {
moduleValue2 = require(4116) /* metro dependency 4116: InviteTypeUtils */;
r1 = !moduleValue2.isGuildScheduledEventInviteEmbed(value);
}
if (!r1) {
(importDefault(9876) /* metro dependency 9876: handleAcceptEventInstantInvite */)(value);
value = 0;
r1 = value;
}
value = !r1;
r2 = value;
}
} else {
r2 = value;
}
}
value = true;
if (r2) {
r0 = value;
} else {
moduleValue3 = require(8872) /* metro dependency 8872: MaskedLinkUtils */;
handleClick = moduleValue3.handleClick;
object2 = {};
object2.href = a0.url;
value6 = a0.node != null;
if (value6) {
moduleValue4 = require(9875) /* metro dependency 9875: MarkupReactLinkUtils */;
r6 = moduleValue4.isLinkTrusted(a0.node);
} else {
r6 = value6;
}
object2.trusted = r6;
object2.messageId = a0.messageId;
object2.channelId = a1;
Reflect.apply(handleClick, moduleValue3, [object2]);
r0 = value;
}
}
return r0;
}
function handleMessagesTapLink({allowWithinModal, chatInputRef, handleTransitionToThread, message, messageChannel, selectedChannelId, tapLinkData}) { // fn#77457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10060:1089, offset: 0x01dfcc69, size: 2644 bytes, params: 2, frame: 31
var id;
var r4;
var r12;
var guild_id;
var r7;
var author;
var r6;
var value;
var handleMessagesTapURLLinkBinding;
var value2;
var action;
var current;
var insertText;
var text;
var addSpace;
var getChannel;
var value3;
var notificationType;
var value4;
var defaultImport;
var openLazy;
var object2;
var MESSAGE_EMBED;
var moduleValue2;
var openGuildHighlightNotificationForPush;
var moduleValue3;
var moduleValue4;
var transitionTo;
var CHANNEL;
var guildId;
var trackRoleSubscriptionPurchaseMessageTierClick;
var value5;
var value6;
var value7;
const KeyboardTypes = require(dependencyMap[32]).KeyboardTypes;
var value9;
var value11;
var moduleValue5;
var defaultImport2;
var moduleValue6;
var userRecord;
var applicationId;
var value12;
var getSectionBinding;
var sectionBinding;
var descriptor;
var value14;
var value16;
var getMessage;
var value18;
var removeAutomodMessageNotice;
var rootNavigationRef;
var stream;
var defaultImport3;
var messageReference;
var defaultImport4;
const data = tapLinkData.data;
if (allowWithinModal === true) {
handleMessagesTapURLLinkBinding = handleMessagesTapURLLink;
value2 = undefined;
id = messageChannel == null ? value2 : messageChannel.id;
if (handleMessagesTapURLLinkBinding(data, id)) {
return undefined;
}
action = data.action;
if (action == null) {
return undefined;
}
action = data.action;
if (action === 'bindUserMenu') {
importDefault(dependencyMap[20])({userId: data.userId, channelId: data.messageChannelId,
messageId: data.messageId});
return undefined;
}
if (action === 'bindGuildMenu') {
messageReference = data.messageReference;
if (messageReference == null) {
return value2;
}
messageReference = data.messageReference;
guild_id = messageReference.guild_id;
if (guild_id == null) {
return value2;
}
defaultImport4 = importDefault(dependencyMap[21]);
openLazy = defaultImport4.openLazy;
value = require(dependencyMap[23]);
value = value(dependencyMap[22], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport4, [value, 'GuildProfileActionSheet:' + guild_id,
{guildId: guild_id}]);
return undefined;
}
if (action === 'bindJoinStream') {
stream = data.stream;
if (stream == null) {
return value2;
}
defaultImport3 = importDefault(dependencyMap[24]);
defaultImport3.selectVoiceChannel(stream.channelId);
require(dependencyMap[25]).watchStreamAndTransitionToStream(stream);
return undefined;
}
if (action === 'bindOpenPins') {
rootNavigationRef = require(dependencyMap[26]).getRootNavigationRef();
if (rootNavigationRef == null) {
return value2;
}
if (rootNavigationRef.isReady()) {
rootNavigationRef.navigate('sidebar', {initialRouteName: ChannelDetailsNavigatorScreens.PINNED_MESSAGES,
channelId: data.messageChannelId, source: 'pinned-message-system-message'});
return undefined;
}
return value2;
}
if (action === 'bindOpenGdmCustomizeActionSheet') {
importDefault(dependencyMap[27])({channelId: data.messageChannelId});
return undefined;
}
if (action === 'bindDismissMessage') {
getMessage = GuildAutomodMessageStore.getMessage;
message = data.message;
value18 = Reflect.apply(getMessage, GuildAutomodMessageStore, [message == null ? value2 : message.id]);
if (value18 == null) {
value = importDefault(dependencyMap[29]);
value.dismissAutomatedMessage(data.message);
} else if (value18.isBlockedEdit) {
value = require(dependencyMap[28]);
removeAutomodMessageNotice = value.removeAutomodMessageNotice;
message = data.message;
Reflect.apply(removeAutomodMessageNotice, value, [message == null ? value2 : message.id]);
} else {
value = importDefault(dependencyMap[29]);
value.dismissAutomatedMessage(data.message);
}
return undefined;
}
if (action === 'bindTapUsername') {
value = importDefault(dependencyMap[20]);
object2 = {};
object2.userId = data.userId;
object2.channelId = data.messageChannelId;
object2.messageId = data.messageId;
object2.sourceAnalyticsLocations = [importDefault(dependencyMap[30]).USERNAME];
value(object2);
return undefined;
}
if (action === 'bindTapCommandName') {
if ((message == null ? value2 : message.interaction) == null) {
return value2;
}
if (messageChannel == null) {
return value2;
}
value11 = UserStore.getUser(data.userId);
if (value11 == null) {
return value2;
}
moduleValue5 = require(dependencyMap[31]);
if (moduleValue5.isPrimaryEntryPointCommandMessage(message)) {
applicationId = message.applicationId;
if (applicationId == null) {
return value2;
}
value12 = ChannelStore.getChannel(data.messageChannelId);
if (value12 == null) {
return value2;
}
getSectionBinding = getSection;
applicationId = message.applicationId;
sectionBinding = getSectionBinding({channel: value12, type: 'channel'}, applicationId);
descriptor = sectionBinding.descriptor;
if ((descriptor == null ? value2 : descriptor.application) != null) {
value16 = chatInputRef == null;
if (value16) {
r4 = value16;
r6 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r6 = current;
}
if (!r4) {
r6.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, initiallyExpanded: true,
application: sectionBinding.descriptor.application,
installOnDemand: !sectionBinding.isGuildInstalled && !sectionBinding.isUserInstalled}});
}
} else {
value14 = chatInputRef == null;
if (value14) {
r4 = value14;
r7 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r7 = current;
}
if (!r4) {
r7.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, initiallyExpanded: true,
applicationId: message.applicationId, installOnDemand: true}});
}
}
return undefined;
}
author = message == null ? value2 : message.author;
if (author != null) {
defaultImport2 = importDefault(dependencyMap[33]);
object2 = {};
moduleValue6 = require(dependencyMap[34]);
object2.author = moduleValue6.getUserAuthor(message.interaction.user, messageChannel);
object2.channelId = data.messageChannelId;
object2.chatInputRef = chatInputRef;
object2.messageId = data.messageId;
object2.user = value11;
author = message == null ? value2 : message.author;
userRecord = new UserRecord();
object2.applicationUser = userRecord;
userRecord = messageChannel.getGuildId();
object2.guildId = userRecord ?? value2;
object2.messageType = data.messageType;
defaultImport2(object2);
}
return undefined;
}
if (action === 'bindTapActivityText') {
value6 = ApplicationStore.getApplication(data.applicationUserId);
if (value6 == null) {
value9 = chatInputRef == null;
if (value9) {
r4 = value9;
r7 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r7 = current;
}
if (!r4) {
r7.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW,
applicationId: data.applicationUserId,
initiallyExpanded: true}});
}
} else {
value7 = chatInputRef == null;
if (value7) {
r4 = value7;
r7 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r7 = current;
}
if (!r4) {
r7.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, application: value6,
initiallyExpanded: true}});
}
}
} else if (action === 'bindOpenThreadChannel') {
value5 = ChannelStore.getChannel(data.threadId);
if (value5 != null) {
handleTransitionToThread(value5 == null ? value2 : value5.guild_id, value5.id,
OpenThreadAnalyticsLocations.EMBED);
}
} else if (action === 'bindJumpToMessage') {
importDefault(dependencyMap[29]).jumpToMessage({channelId: data.targetChannelId,
messageId: data.targetMessageId,
flash: true, returnMessageId: data.messageId});
} else if (action === 'bindOpenRoleSubscriptionOverview') {
moduleValue4 = require(dependencyMap[35]);
transitionTo = moduleValue4.transitionTo;
CHANNEL = Routes.CHANNEL;
guildId = data.guildId;
Reflect.apply(transitionTo, moduleValue4, [Reflect.apply(CHANNEL, Routes, [guildId,
StaticChannelRoute.ROLE_SUBSCRIPTIONS])]);
value = require(dependencyMap[36]);
trackRoleSubscriptionPurchaseMessageTierClick = value.trackRoleSubscriptionPurchaseMessageTierClick;
guildId = data.guildId;
Reflect.apply(trackRoleSubscriptionPurchaseMessageTierClick, value, [guildId, data.channelId,
data.messageId,
data.roleSubscriptionListingId]);
} else if (action === 'bindUserSurvey') {
getChannel = ChannelStore.getChannel;
message = data.message;
value3 = Reflect.apply(getChannel, ChannelStore, [message.channel_id]);
guild_id = value3 == null ? value2 : value3.guild_id;
if (guild_id != null) {
notificationType = data.notificationType;
if (NotificationTypes.TRENDING_CONTENT_PUSH === notificationType) {
moduleValue3 = require(dependencyMap[37]);
openGuildHighlightNotificationForPush = moduleValue3.openGuildHighlightNotificationForPush;
message = data.message;
notificationType = data.notificationType;
MESSAGE_EMBED = AnalyticsLocations.MESSAGE_EMBED;
value = SummaryStore.selectedSummary(data.message.channel_id);
id = value == null ? value2 : value.id;
value = 'unknown';
Reflect.apply(openGuildHighlightNotificationForPush, moduleValue3, [guild_id, message,
notificationType,
MESSAGE_EMBED, {summary_id: id ?? value}]);
} else if (NotificationTypes.TOP_MESSAGE_PUSH === notificationType) {
moduleValue2 = require(dependencyMap[37]);
moduleValue2.openGuildHighlightNotificationForPush(guild_id, data.message, data.notificationType,
AnalyticsLocations.MESSAGE_EMBED);
} else {
value4 = require(dependencyMap[23])(dependencyMap[38], dependencyMap.paths);
defaultImport = importDefault(dependencyMap[21]);
defaultImport.openLazy(value4, 'NotificationSurvey', {location: AnalyticsLocations.MESSAGE_EMBED,
messageId: data.message.id,
notificationType: data.notificationType ?? NotificationTypes.TOP_MESSAGE_PUSH});
}
}
} else if (action === 'bindInsertText') {
value = chatInputRef == null;
if (value) {
r4 = value;
r12 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r12 = current;
}
if (!r4) {
insertText = r12.insertText;
text = data.text;
addSpace = data.addSpace;
Reflect.apply(insertText, r12, [text, null, addSpace == null || addSpace]);
}
}
} else {
value = require(dependencyMap[19]);
if (value.isAlertOrActionSheetOpen(selectedChannelId)) {
return undefined;
}
handleMessagesTapURLLinkBinding = handleMessagesTapURLLink;
value2 = undefined;
id = messageChannel == null ? value2 : messageChannel.id;
if (handleMessagesTapURLLinkBinding(data, id)) {
return undefined;
}
action = data.action;
if (action == null) {
return undefined;
}
action = data.action;
if (action === 'bindUserMenu') {
importDefault(dependencyMap[20])({userId: data.userId, channelId: data.messageChannelId,
messageId: data.messageId});
return undefined;
}
if (action === 'bindGuildMenu') {
messageReference = data.messageReference;
if (messageReference == null) {
return value2;
}
messageReference = data.messageReference;
guild_id = messageReference.guild_id;
if (guild_id == null) {
return value2;
}
defaultImport4 = importDefault(dependencyMap[21]);
openLazy = defaultImport4.openLazy;
value = require(dependencyMap[23]);
value = value(dependencyMap[22], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport4, [value, 'GuildProfileActionSheet:' + guild_id,
{guildId: guild_id}]);
return undefined;
}
if (action === 'bindJoinStream') {
stream = data.stream;
if (stream == null) {
return value2;
}
defaultImport3 = importDefault(dependencyMap[24]);
defaultImport3.selectVoiceChannel(stream.channelId);
require(dependencyMap[25]).watchStreamAndTransitionToStream(stream);
return undefined;
}
if (action === 'bindOpenPins') {
rootNavigationRef = require(dependencyMap[26]).getRootNavigationRef();
if (rootNavigationRef == null) {
return value2;
}
if (rootNavigationRef.isReady()) {
rootNavigationRef.navigate('sidebar', {initialRouteName: ChannelDetailsNavigatorScreens.PINNED_MESSAGES,
channelId: data.messageChannelId, source: 'pinned-message-system-message'});
return undefined;
}
return value2;
}
if (action === 'bindOpenGdmCustomizeActionSheet') {
importDefault(dependencyMap[27])({channelId: data.messageChannelId});
return undefined;
}
if (action === 'bindDismissMessage') {
getMessage = GuildAutomodMessageStore.getMessage;
message = data.message;
value18 = Reflect.apply(getMessage, GuildAutomodMessageStore, [message == null ? value2 : message.id]);
if (value18 == null) {
value = importDefault(dependencyMap[29]);
value.dismissAutomatedMessage(data.message);
} else if (value18.isBlockedEdit) {
value = require(dependencyMap[28]);
removeAutomodMessageNotice = value.removeAutomodMessageNotice;
message = data.message;
Reflect.apply(removeAutomodMessageNotice, value, [message == null ? value2 : message.id]);
} else {
value = importDefault(dependencyMap[29]);
value.dismissAutomatedMessage(data.message);
}
return undefined;
}
if (action === 'bindTapUsername') {
value = importDefault(dependencyMap[20]);
object2 = {};
object2.userId = data.userId;
object2.channelId = data.messageChannelId;
object2.messageId = data.messageId;
object2.sourceAnalyticsLocations = [importDefault(dependencyMap[30]).USERNAME];
value(object2);
return undefined;
}
if (action === 'bindTapCommandName') {
if ((message == null ? value2 : message.interaction) == null) {
return value2;
}
if (messageChannel == null) {
return value2;
}
value11 = UserStore.getUser(data.userId);
if (value11 == null) {
return value2;
}
moduleValue5 = require(dependencyMap[31]);
if (moduleValue5.isPrimaryEntryPointCommandMessage(message)) {
applicationId = message.applicationId;
if (applicationId == null) {
return value2;
}
value12 = ChannelStore.getChannel(data.messageChannelId);
if (value12 == null) {
return value2;
}
getSectionBinding = getSection;
applicationId = message.applicationId;
sectionBinding = getSectionBinding({channel: value12, type: 'channel'}, applicationId);
descriptor = sectionBinding.descriptor;
if ((descriptor == null ? value2 : descriptor.application) != null) {
value16 = chatInputRef == null;
if (value16) {
r4 = value16;
r6 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r6 = current;
}
if (!r4) {
r6.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, initiallyExpanded: true,
application: sectionBinding.descriptor.application,
installOnDemand: !sectionBinding.isGuildInstalled && !sectionBinding.isUserInstalled}});
}
} else {
value14 = chatInputRef == null;
if (value14) {
r4 = value14;
r7 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r7 = current;
}
if (!r4) {
r7.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, initiallyExpanded: true,
applicationId: message.applicationId, installOnDemand: true}});
}
}
return undefined;
}
author = message == null ? value2 : message.author;
if (author != null) {
defaultImport2 = importDefault(dependencyMap[33]);
object2 = {};
moduleValue6 = require(dependencyMap[34]);
object2.author = moduleValue6.getUserAuthor(message.interaction.user, messageChannel);
object2.channelId = data.messageChannelId;
object2.chatInputRef = chatInputRef;
object2.messageId = data.messageId;
object2.user = value11;
author = message == null ? value2 : message.author;
userRecord = new UserRecord();
object2.applicationUser = userRecord;
userRecord = messageChannel.getGuildId();
object2.guildId = userRecord ?? value2;
object2.messageType = data.messageType;
defaultImport2(object2);
}
return undefined;
}
if (action === 'bindTapActivityText') {
value6 = ApplicationStore.getApplication(data.applicationUserId);
if (value6 == null) {
value9 = chatInputRef == null;
if (value9) {
r4 = value9;
r7 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r7 = current;
}
if (!r4) {
r7.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW,
applicationId: data.applicationUserId,
initiallyExpanded: true}});
}
} else {
value7 = chatInputRef == null;
if (value7) {
r4 = value7;
r7 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r7 = current;
}
if (!r4) {
r7.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, application: value6,
initiallyExpanded: true}});
}
}
} else if (action === 'bindOpenThreadChannel') {
value5 = ChannelStore.getChannel(data.threadId);
if (value5 != null) {
handleTransitionToThread(value5 == null ? value2 : value5.guild_id, value5.id,
OpenThreadAnalyticsLocations.EMBED);
}
} else if (action === 'bindJumpToMessage') {
importDefault(dependencyMap[29]).jumpToMessage({channelId: data.targetChannelId,
messageId: data.targetMessageId,
flash: true, returnMessageId: data.messageId});
} else if (action === 'bindOpenRoleSubscriptionOverview') {
moduleValue4 = require(dependencyMap[35]);
transitionTo = moduleValue4.transitionTo;
CHANNEL = Routes.CHANNEL;
guildId = data.guildId;
Reflect.apply(transitionTo, moduleValue4, [Reflect.apply(CHANNEL, Routes, [guildId,
StaticChannelRoute.ROLE_SUBSCRIPTIONS])]);
value = require(dependencyMap[36]);
trackRoleSubscriptionPurchaseMessageTierClick = value.trackRoleSubscriptionPurchaseMessageTierClick;
guildId = data.guildId;
Reflect.apply(trackRoleSubscriptionPurchaseMessageTierClick, value, [guildId, data.channelId,
data.messageId,
data.roleSubscriptionListingId]);
} else if (action === 'bindUserSurvey') {
getChannel = ChannelStore.getChannel;
message = data.message;
value3 = Reflect.apply(getChannel, ChannelStore, [message.channel_id]);
guild_id = value3 == null ? value2 : value3.guild_id;
if (guild_id != null) {
notificationType = data.notificationType;
if (NotificationTypes.TRENDING_CONTENT_PUSH === notificationType) {
moduleValue3 = require(dependencyMap[37]);
openGuildHighlightNotificationForPush = moduleValue3.openGuildHighlightNotificationForPush;
message = data.message;
notificationType = data.notificationType;
MESSAGE_EMBED = AnalyticsLocations.MESSAGE_EMBED;
value = SummaryStore.selectedSummary(data.message.channel_id);
id = value == null ? value2 : value.id;
value = 'unknown';
Reflect.apply(openGuildHighlightNotificationForPush, moduleValue3, [guild_id, message,
notificationType,
MESSAGE_EMBED, {summary_id: id ?? value}]);
} else if (NotificationTypes.TOP_MESSAGE_PUSH === notificationType) {
moduleValue2 = require(dependencyMap[37]);
moduleValue2.openGuildHighlightNotificationForPush(guild_id, data.message, data.notificationType,
AnalyticsLocations.MESSAGE_EMBED);
} else {
value4 = require(dependencyMap[23])(dependencyMap[38], dependencyMap.paths);
defaultImport = importDefault(dependencyMap[21]);
defaultImport.openLazy(value4, 'NotificationSurvey', {location: AnalyticsLocations.MESSAGE_EMBED,
messageId: data.message.id,
notificationType: data.notificationType ?? NotificationTypes.TOP_MESSAGE_PUSH});
}
}
} else if (action === 'bindInsertText') {
value = chatInputRef == null;
if (value) {
r4 = value;
r12 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r12 = current;
}
if (!r4) {
insertText = r12.insertText;
text = data.text;
addSpace = data.addSpace;
Reflect.apply(insertText, r12, [text, null, addSpace == null || addSpace]);
}
}
}
}