746 lines
37 KiB
TypeScript
746 lines
37 KiB
TypeScript
/* 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] */
|
|
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
import UserRecord from '../../../../records/UserRecord.tsx'; /* Metro dependency 1885 */
|
|
import InviteStore from '../../../../stores/InviteStore.tsx'; /* Metro dependency 4097 */
|
|
import ApplicationStore from '../../../applications/ApplicationStore.tsx'; /* Metro dependency 4234 */
|
|
import GuildAutomodMessageStore from '../../../guild_automod/GuildAutomodMessageStore.tsx'; /* Metro dependency 8183 */
|
|
import SummaryStore from '../../../summaries/SummaryStore.tsx'; /* Metro dependency 9865 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as ThreadConstantsModule from '../../../threads/ThreadConstants.tsx'; /* Metro dependency 1243 */
|
|
import * as ChannelConstantsModule from '../../../channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
|
|
import * as AppLauncherNativeConstantsModule from '../../../app_launcher/native/AppLauncherNativeConstants.tsx'; /* Metro dependency 1483 */
|
|
import * as PushNotificationConstantsModule from '../../../push_notifications/PushNotificationConstants.tsx'; /* Metro dependency 5079 */
|
|
import * as ApplicationCommandIndexStoreModule from '../../../application_commands/ApplicationCommandIndexStore.tsx'; /* Metro dependency 7861 */
|
|
import * as ChannelDetailsConstantsModule from '../../../main_tabs_v2/native/sidebar/details/ChannelDetailsConstants.tsx'; /* Metro dependency 9696 */
|
|
|
|
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 handleMessagesTapURLLink2 = handleMessagesTapURLLink;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/handlers/handleMessagesTapLink.tsx');
|
|
exports.handleMessagesTapURLLink = handleMessagesTapURLLink2;
|
|
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 inviteStoreBinding;
|
|
var value3;
|
|
var moduleValue2;
|
|
var moduleValue3;
|
|
var handleClick;
|
|
var object;
|
|
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 {
|
|
inviteStoreBinding = InviteStore;
|
|
value = inviteStoreBinding.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;
|
|
object = {};
|
|
object.href = a0.url;
|
|
value6 = a0.node != null;
|
|
if (value6) {
|
|
moduleValue4 = require(9875) /* metro dependency 9875: MarkupReactLinkUtils */;
|
|
r6 = moduleValue4.isLinkTrusted(a0.node);
|
|
} else {
|
|
r6 = value6;
|
|
}
|
|
object.trusted = r6;
|
|
object.messageId = a0.messageId;
|
|
object.channelId = a1;
|
|
Reflect.apply(handleClick, moduleValue3, [object]);
|
|
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 channelStoreBinding;
|
|
var getChannel;
|
|
var value3;
|
|
var notificationType;
|
|
var value4;
|
|
var defaultImport;
|
|
var openLazy;
|
|
var object;
|
|
var MESSAGE_EMBED;
|
|
var moduleValue2;
|
|
var openGuildHighlightNotificationForPush;
|
|
var moduleValue3;
|
|
var summaryStoreBinding;
|
|
var moduleValue4;
|
|
var transitionTo;
|
|
var CHANNEL;
|
|
var guildId;
|
|
var trackRoleSubscriptionPurchaseMessageTierClick;
|
|
var value5;
|
|
var applicationStoreBinding;
|
|
var value6;
|
|
var value7;
|
|
const KeyboardTypes = require(dependencyMap[32]).KeyboardTypes;
|
|
var value9;
|
|
var userStoreBinding;
|
|
var value11;
|
|
var moduleValue5;
|
|
var defaultImport2;
|
|
var moduleValue6;
|
|
var userRecordBinding;
|
|
var userRecord2;
|
|
var applicationId;
|
|
var value12;
|
|
var getSectionBinding;
|
|
var sectionBinding;
|
|
var descriptor;
|
|
var value14;
|
|
var value16;
|
|
var guildAutomodMessageStoreBinding;
|
|
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') {
|
|
guildAutomodMessageStoreBinding = GuildAutomodMessageStore;
|
|
getMessage = guildAutomodMessageStoreBinding.getMessage;
|
|
message = data.message;
|
|
value18 = Reflect.apply(getMessage, guildAutomodMessageStoreBinding,
|
|
[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]);
|
|
object = {};
|
|
object.userId = data.userId;
|
|
object.channelId = data.messageChannelId;
|
|
object.messageId = data.messageId;
|
|
object.sourceAnalyticsLocations = [importDefault(dependencyMap[30]).USERNAME];
|
|
value(object);
|
|
return undefined;
|
|
}
|
|
if (action === 'bindTapCommandName') {
|
|
if ((message == null ? value2 : message.interaction) == null) {
|
|
return value2;
|
|
}
|
|
if (messageChannel == null) {
|
|
return value2;
|
|
}
|
|
userStoreBinding = UserStore;
|
|
value11 = userStoreBinding.getUser(data.userId);
|
|
if (value11 == null) {
|
|
return value2;
|
|
}
|
|
moduleValue5 = require(dependencyMap[31]);
|
|
if (moduleValue5.isPrimaryEntryPointCommandMessage(message)) {
|
|
applicationId = message.applicationId;
|
|
if (applicationId == null) {
|
|
return value2;
|
|
}
|
|
channelStoreBinding = ChannelStore;
|
|
value12 = channelStoreBinding.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]);
|
|
object = {};
|
|
moduleValue6 = require(dependencyMap[34]);
|
|
object.author = moduleValue6.getUserAuthor(message.interaction.user, messageChannel);
|
|
object.channelId = data.messageChannelId;
|
|
object.chatInputRef = chatInputRef;
|
|
object.messageId = data.messageId;
|
|
object.user = value11;
|
|
userRecordBinding = UserRecord;
|
|
author = message == null ? value2 : message.author;
|
|
userRecord2 = new userRecordBinding();
|
|
object.applicationUser = userRecord2;
|
|
userRecord2 = messageChannel.getGuildId();
|
|
object.guildId = userRecord2 ?? value2;
|
|
object.messageType = data.messageType;
|
|
defaultImport2(object);
|
|
}
|
|
return undefined;
|
|
}
|
|
if (action === 'bindTapActivityText') {
|
|
applicationStoreBinding = ApplicationStore;
|
|
value6 = applicationStoreBinding.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') {
|
|
channelStoreBinding = ChannelStore;
|
|
value5 = channelStoreBinding.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') {
|
|
channelStoreBinding = ChannelStore;
|
|
getChannel = channelStoreBinding.getChannel;
|
|
message = data.message;
|
|
value3 = Reflect.apply(getChannel, channelStoreBinding, [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;
|
|
summaryStoreBinding = SummaryStore;
|
|
value = summaryStoreBinding.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') {
|
|
guildAutomodMessageStoreBinding = GuildAutomodMessageStore;
|
|
getMessage = guildAutomodMessageStoreBinding.getMessage;
|
|
message = data.message;
|
|
value18 = Reflect.apply(getMessage, guildAutomodMessageStoreBinding,
|
|
[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]);
|
|
object = {};
|
|
object.userId = data.userId;
|
|
object.channelId = data.messageChannelId;
|
|
object.messageId = data.messageId;
|
|
object.sourceAnalyticsLocations = [importDefault(dependencyMap[30]).USERNAME];
|
|
value(object);
|
|
return undefined;
|
|
}
|
|
if (action === 'bindTapCommandName') {
|
|
if ((message == null ? value2 : message.interaction) == null) {
|
|
return value2;
|
|
}
|
|
if (messageChannel == null) {
|
|
return value2;
|
|
}
|
|
userStoreBinding = UserStore;
|
|
value11 = userStoreBinding.getUser(data.userId);
|
|
if (value11 == null) {
|
|
return value2;
|
|
}
|
|
moduleValue5 = require(dependencyMap[31]);
|
|
if (moduleValue5.isPrimaryEntryPointCommandMessage(message)) {
|
|
applicationId = message.applicationId;
|
|
if (applicationId == null) {
|
|
return value2;
|
|
}
|
|
channelStoreBinding = ChannelStore;
|
|
value12 = channelStoreBinding.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]);
|
|
object = {};
|
|
moduleValue6 = require(dependencyMap[34]);
|
|
object.author = moduleValue6.getUserAuthor(message.interaction.user, messageChannel);
|
|
object.channelId = data.messageChannelId;
|
|
object.chatInputRef = chatInputRef;
|
|
object.messageId = data.messageId;
|
|
object.user = value11;
|
|
userRecordBinding = UserRecord;
|
|
author = message == null ? value2 : message.author;
|
|
userRecord2 = new userRecordBinding();
|
|
object.applicationUser = userRecord2;
|
|
userRecord2 = messageChannel.getGuildId();
|
|
object.guildId = userRecord2 ?? value2;
|
|
object.messageType = data.messageType;
|
|
defaultImport2(object);
|
|
}
|
|
return undefined;
|
|
}
|
|
if (action === 'bindTapActivityText') {
|
|
applicationStoreBinding = ApplicationStore;
|
|
value6 = applicationStoreBinding.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') {
|
|
channelStoreBinding = ChannelStore;
|
|
value5 = channelStoreBinding.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') {
|
|
channelStoreBinding = ChannelStore;
|
|
getChannel = channelStoreBinding.getChannel;
|
|
message = data.message;
|
|
value3 = Reflect.apply(getChannel, channelStoreBinding, [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;
|
|
summaryStoreBinding = SummaryStore;
|
|
value = summaryStoreBinding.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]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun77455, 9874, [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]) /* metro module 9874, 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] */;
|