This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,20 @@
// Metro module 10032 (f10033).
import { getChannelPermalink } from "../../../../utils/ChannelUtils";
import showLongPressURLActionSheet from "../../../links/native/showLongPressURLActionSheet";
export function handleMessagesLongPressChannel({ data }) {
const { guildId, channelId, messageId } = data;
let originalLink = data.originalLink;
if (!(channelId == null && originalLink == null)) {
if (originalLink == null) {
originalLink = getChannelPermalink(guildId, channelId, messageId);
}
if (originalLink != null) {
showLongPressURLActionSheet({
urlString: originalLink,
guildId,
channelId,
messageId
});
}
}
}
@@ -0,0 +1,293 @@
// Metro module 9990 (f9991).
import { isGuildVocalChannelType } from "../../../../records/ChannelRecord";
import { isGuildLurker } from "../../../../records/GuildRecord";
import ChannelStore from "../../../../stores/ChannelStore";
import GuildMemberStore from "../../../../stores/GuildMemberStore";
import GuildRoleStore from "../../../../stores/GuildRoleStore";
import GuildStore from "../../../../stores/GuildStore";
import PermissionStore from "../../../../stores/PermissionStore";
import { ChannelTypes, GuildFeatures, Permissions, Routes } from "../../../../Constants";
import { StaticChannelRoute } from "../../../channel/ChannelConstants";
import { GuildOnboardingTab } from "../../../guild_onboarding/GuildOnboardingPromptsConstants";
import { CHANNELS_AND_ROLES_MODAL_KEY } from "../../../guild_onboarding/native/GuildOnboardingConstants";
import { startLurking } from "../../../../utils/GuildDiscoveryUtils";
import LinkAnalyticsUtils from "../../../links/LinkAnalyticsUtils";
import { isStaticRouteIconType } from "../../../markup/MarkupRulesUtils";
import ModalActionCreators from "../../../../actions/ModalActionCreators";
import "../../../../_bundle/asyncRequire";
import safeTransitionTo_native from "../../../links/safeTransitionTo.native";
import ActionSheetActionCreators from "../../../action_sheet/native/ActionSheetActionCreators";
import { assertNever } from "../../../../utils/GlobalUtils";
import { canViewChannel } from "../../../links/LinkUtils";
import { openChannelCallModal } from "../../../../utils/native/PrivateChannelCallUtils";
import SelectedChannelActionCreators from "../../../../actions/SelectedChannelActionCreators";
const maybeStartLurking = async function maybeStartLurking(c26586_0, c26586_1, channelId, messageId) {
let c26586_6 = 0;
L13: {
L10: {
try {
if (c26586_0 != null && !isGuildLurker(c26586_0)) {
break L10;
}
c26586_6 = 1;
await startLurking(c26586_1, {}, {
channelId,
messageId
});
c26586_6 = 0;
break L13;
} catch ($e) {
let r27 = $e;
if (c26586_6 !== 0) {
while (true) {
try {
c26586_6 = 0;
} catch ($e) {
r27 = $e;
if (c26586_6 === 0) {
break;
}
continue;
}
return false;
}
}
throw r27;
}
}
return false;
}
return true;
};
export async function handleMessagesTapChannel(c26587_0) {
let c26587_2;
let c30175_0, c30175_1, c30175_2, c30175_3, c30175_4, c30175_5, c30175_6, c30175_7, c30175_8, c30175_9, c30175_10, c30175_11;
L30: {
L91: {
L75: {
L68: {
L57: {
L48: {
L47: {
L44: {
L41: {
L38: {
c26587_2 = void 0;
c30175_0 = void 0;
c30175_1 = void 0;
c30175_2 = void 0;
c30175_3 = void 0;
c30175_0 = c26587_0.data;
const navigationReplace = c26587_0.navigationReplace;
if (navigationReplace !== void 0) {
c30175_1 = navigationReplace;
c30175_2 = c26587_0.onBeforeNavigate;
c30175_3 = c26587_0.dismissKeyboard;
c30175_4 = void 0;
c30175_5 = void 0;
c30175_6 = void 0;
c30175_7 = void 0;
c30175_8 = void 0;
c30175_9 = void 0;
c30175_10 = void 0;
c30175_11 = void 0;
} else {
c30175_1 = false;
c30175_2 = c26587_0.onBeforeNavigate;
c30175_3 = c26587_0.dismissKeyboard;
c30175_4 = void 0;
c30175_5 = void 0;
c30175_6 = void 0;
c30175_7 = void 0;
c30175_8 = void 0;
c30175_9 = void 0;
c30175_10 = void 0;
c30175_11 = void 0;
}
await void 0;
c30175_4 = c30175_0.channelId;
c30175_5 = c30175_0.guildId;
c30175_6 = c30175_0.messageId;
c30175_7 = c30175_4 != null ? ChannelStore.getChannel(c30175_4) : null;
c30175_8 = GuildStore.getGuild(c30175_5);
LinkAnalyticsUtils.trackDiscordLinkClicked({
guildId: c30175_5,
channelId: c30175_4,
messageId: c30175_6
});
if (c30175_5 != null && c30175_4 != null) {
if (isStaticRouteIconType(c30175_4)) {
if (c30175_8 == null) {
break L48;
}
const r107 = c30175_4;
if (r107 === "browse") {
if (c30175_8.features.has(GuildFeatures.COMMUNITY)) {
ModalActionCreators.pushLazy(import("../../../guild_onboarding/native/ChannelsAndRolesModal"), {
guildId: c30175_5,
defaultTab: GuildOnboardingTab.BROWSE
}, CHANNELS_AND_ROLES_MODAL_KEY);
break L30;
}
break L47;
}
if (r107 === "customize") {
if (c30175_8.features.has(GuildFeatures.COMMUNITY)) {
ModalActionCreators.pushLazy(import("../../../guild_onboarding/native/ChannelsAndRolesModal"), {
guildId: c30175_5,
defaultTab: GuildOnboardingTab.CUSTOMIZE
}, CHANNELS_AND_ROLES_MODAL_KEY);
break L30;
}
break L44;
}
if (r107 !== "home" && r107 !== "guide") {
if (r107 === "linked-roles") {
c30175_9 = c30175_6;
if (c30175_9 != null) {
c30175_10 = GuildMemberStore.getSelfMember(c30175_5);
if (c30175_10 == null) {
break L38;
}
c30175_11 = GuildRoleStore.getRole(c30175_5, c30175_9);
if (c30175_11 != null) {
if (!c30175_10.roles.includes(c30175_11.id)) {
ActionSheetActionCreators.openLazy(import("../../../connections/native/GuildRoleConnectionsConnectAccountsActionSheet"), `GuildRoleConnectionsConnectAccountsActionSheet-${c30175_11.id}`, {
role: c30175_11,
guildId: c30175_5
});
break L30;
}
}
ModalActionCreators.pushLazy(import("../../../connections/native/GuildRoleConnectionsModal"), {
guildId: c30175_5
});
break L30;
}
ModalActionCreators.pushLazy(import("../../../connections/native/GuildRoleConnectionsModal"), {
guildId: c30175_5
});
break L30;
}
assertNever(c30175_4);
break L30;
}
if (c30175_8.features.has(GuildFeatures.COMMUNITY)) {
safeTransitionTo_native(Routes.CHANNEL(c30175_5, StaticChannelRoute.GUILD_HOME), {
navigationReplace: c30175_1,
openChannel: true
});
break L30;
}
break L41;
}
}
if (c30175_6 != null && c30175_7 != null) {
if (!c30175_7.isPrivate()) {
if (await (0, maybeStartLurking)(c30175_8, c30175_7.guild_id, c30175_7.id, c30175_6)) {
break L57;
}
}
const r303 = c30175_2;
if (r303 != null) {
r303();
}
safeTransitionTo_native(Routes.CHANNEL(c30175_7.guild_id, c30175_7.id, c30175_6), {
navigationReplace: c30175_1,
openChannel: true
});
break L30;
}
if (c30175_7 != null && c30175_5 != null) {
if (!c30175_7.isPrivate()) {
if (await (0, maybeStartLurking)(c30175_8, c30175_5, c30175_7.id, c30175_6)) {
break L68;
}
}
if ((0, isGuildVocalChannelType)(c30175_7.type)) {
if (canViewChannel(c30175_7)) {
if (c30175_7.type === ChannelTypes.GUILD_STAGE_VOICE) {
if (!PermissionStore.can(Permissions.CONNECT, c30175_7)) {
break L75;
}
}
const r402 = c30175_3;
if (r402 != null) {
r402();
}
const r414 = c30175_2;
if (r414 != null) {
r414();
}
openChannelCallModal(c30175_7);
break L30;
}
}
const r384 = c30175_2;
if (r384 != null) {
r384();
}
safeTransitionTo_native(Routes.CHANNEL(c30175_5, c30175_7.id), {
navigationReplace: c30175_1,
openChannel: true
});
break L30;
}
if (c30175_4 != null && c30175_5 != null) {
if (await (0, maybeStartLurking)(c30175_8, c30175_5, c30175_4, c30175_6)) {
break L91;
}
const r471 = c30175_2;
if (r471 != null) {
r471();
}
safeTransitionTo_native(Routes.CHANNEL(c30175_5, c30175_4, c30175_6), {
navigationReplace: c30175_1,
openChannel: true
});
break L30;
}
if (c30175_7 != null && c30175_7.isPrivate()) {
const r499 = c30175_3;
if (r499 != null) {
r499();
}
const r501 = c30175_2;
if (r501 != null) {
r501();
}
SelectedChannelActionCreators.selectVoiceChannel(c30175_4);
break L30;
}
if (!(c30175_4 != null && c30175_5 == null)) {
break L30;
}
const r516 = c30175_2;
if (r516 != null) {
r516();
}
safeTransitionTo_native(Routes.CHANNEL(c30175_5, c30175_4, c30175_6), {
navigationReplace: c30175_1,
openChannel: true
});
break L30;
}
return void 0;
}
return void 0;
}
return void 0;
}
return void 0;
}
return void 0;
}
return void 0;
}
return void 0;
}
return void 0;
}
return void 0;
}
}
@@ -0,0 +1,13 @@
// Metro module 10928 (f10929).
import GameProfileActionCreators_native from "../../../game_profile/GameProfileActionCreators.native";
import { GameProfileSources } from "../../../game_profile/GameProfileAnalyticUtils";
export function handleMessagesTapGameMention({ gameId }) {
GameProfileActionCreators_native.openGameProfileModal({
gameId,
gameProfileModalChecks: {
shouldOpenGameProfile: true,
gameId
},
source: GameProfileSources.GameMention
});
}
@@ -0,0 +1,162 @@
// Metro module 9989 (f9990).
import ReferencedMessageStore from "../../../replies/ReferencedMessageStore";
import RelationshipStore from "../../../../stores/RelationshipStore";
import UserStore from "../../../../stores/UserStore";
import { MessageTypes } from "../../../../Constants";
import { markPortalAlive } from "../../../../components_native/common/NativePortalView";
import { isAlertOrActionSheetOpen } from "../../../../components_native/chat/isAlertOrActionSheetOpen";
import { MessageReferenceTypes } from "../../../../_bundle/Module694";
import { isThumbnailAttachment, extractMediaFromAttachment, extractMediaSourcesFromEmbed, setMediaSourcePortal, extractMediaSourcesFromComponent, extractMediaSourcesFromMessage, flattenSource } from "../../../media_viewer/native/MediaSourceUtil";
import Linking from "../../../../lib/native/Linking";
import { asComponentId } from "../../../interaction_components/InteractionComponentTypes";
import { openMediaModal } from "../../../media_viewer/native/components/openMediaModal";
import { computeChannelName } from "../../../channel/useChannelName";
import { getChannelIcon } from "../../../../utils/native/ChannelUtils";
export function handleMessagesTapImage(a0) {
let r99, r134, length;
let initialIndex;
const tapImageData = a0.tapImageData;
const { index, type, layout, portal, embedIndex, componentId, componentMediaIndex, embedId } = tapImageData;
const { allowWithinModal, message, messageChannel, selectedChannelId, showContextName } = a0;
initialIndex = void 0;
if (portal != null) {
markPortalAlive(portal);
}
L61: {
if (!(allowWithinModal !== true && isAlertOrActionSheetOpen(selectedChannelId))) {
if (type !== "attachment" && type !== "embed" && type !== "sticker" && type !== "component") {
throw new Error(`Unsupported thumbnail type: ${type}`);
}
const type2 = message.type;
const THREAD_STARTER_MESSAGE = MessageTypes.THREAD_STARTER_MESSAGE;
let r27 = message;
if (type2 === THREAD_STARTER_MESSAGE) {
const messageReference = message.messageReference;
r27 = message;
if (messageReference != null) {
const message2 = ReferencedMessageStore.getMessageByReference(message.messageReference).message;
r27 = message2 ?? message;
}
}
const type3 = r27.messageReference?.type;
const FORWARD = MessageReferenceTypes.FORWARD;
let r26 = r27;
if (type3 === FORWARD) {
r26 = r27.messageSnapshots[0]?.message;
if (r26 == null) {
break L61;
}
}
const r81 = r27.attachments.filter((attachment) => !isThumbnailAttachment(attachment));
if (type === "attachment" && index < r81.length) {
const r83 = r81[index];
if (extractMediaFromAttachment(r83, r27, index, messageChannel.guild_id) == null && r83.url != null && r83.url !== "") {
Linking.openURL(r83.url);
return void 0;
}
}
L53: {
initialIndex = -1;
if (type === "embed" && embedIndex != null) {
const r160 = r26.embeds[index];
initialIndex = embedIndex;
const r169 = extractMediaSourcesFromEmbed(r27, r26, r160, index, messageChannel.guild_id);
const length2 = r169.length;
r99 = r169;
if (!(initialIndex < length2)) {
break L53;
}
setMediaSourcePortal(r169[initialIndex], portal);
r99 = r169;
} else {
if (type === "component") {
if (componentId == null) {
return null;
}
L44: {
if (embedId != null && embedId !== "") {
const r132 = r26.embeds.find((embed) => embed.id === embedId);
const r133 = r132 == null;
r134 = void 0;
if (r133) {
break L44;
}
r134 = r132.components;
} else {
r134 = r26.components;
}
}
if (r134 != null && r134.length !== 0) {
const r148 = extractMediaSourcesFromComponent(r27, r134, messageChannel.guild_id, asComponentId(componentId), componentMediaIndex);
if (r148 == null) {
return void 0;
}
const sources = r148.sources;
initialIndex = r148.initialIndex;
setMediaSourcePortal(sources[initialIndex], portal);
r99 = sources;
break L53;
}
return void 0;
}
const r29 = extractMediaSourcesFromMessage(r27, r26, messageChannel.guild_id);
const r98 = 0 < r29.length;
let r0 = 0;
r99 = r29;
if (r98) {
do {
const r103 = flattenSource(r29[r0]);
const r1 = r0;
if (r103 != null && r103.accessoryType === type) {
let mediaViewIndex = r103.mediaViewIndex;
if (mediaViewIndex == null) {
mediaViewIndex = r103.mediaIndex;
}
if (mediaViewIndex === index) {
if (r103.noCarousel) {
const r120 = [r29[r1]];
initialIndex = 0;
setMediaSourcePortal(r120[0], portal);
r99 = r120;
break;
}
initialIndex = r1;
setMediaSourcePortal(r29[r1], portal);
r99 = r29.filter((item, index) => {
const r10 = flattenSource(item);
const r12 = r10 != null && !r10.noCarousel;
if (r12 ? !r12 : initialIndex >= index) {
initialIndex = initialIndex - 1;
}
return r12;
});
break;
}
}
r0 = r1 + 1;
length = r29.length;
r99 = r29;
} while (r0 < length);
}
}
}
const disableDownload = r99.some((item) => {
const r9 = flattenSource(item, true);
return r9 != null && r9.disableDownload;
});
const initialSources = r99;
if (initialIndex !== -1) {
openMediaModal({
disableDownload,
initialSources,
initialIndex,
originViewOrOriginLayout: layout,
analyticsSource: "Channel",
channelId: messageChannel.id,
contextName: showContextName ? computeChannelName(messageChannel, UserStore, RelationshipStore, false) : void 0,
contextIcon: showContextName ? getChannelIcon(messageChannel) : void 0
});
}
}
}
}
@@ -0,0 +1,344 @@
// Metro module 9504 (f9505).
import { getSection } from "../../../application_commands/ApplicationCommandIndexStore";
import ApplicationStore from "../../../applications/ApplicationStore";
import GuildAutomodMessageStore from "../../../guild_automod/GuildAutomodMessageStore";
import SummaryStore from "../../../summaries/SummaryStore";
import UserRecord from "../../../../records/UserRecord";
import ChannelStore from "../../../../stores/ChannelStore";
import InviteStore from "../../../../stores/InviteStore";
import MessageStore from "../../../../stores/MessageStore";
import UserStore from "../../../../stores/UserStore";
import { AnalyticsLocations, LinkingTypes, Routes } from "../../../../Constants";
import { AppLauncherRouteName } from "../../../app_launcher/native/AppLauncherNativeConstants";
import { StaticChannelRoute } from "../../../channel/ChannelConstants";
import { NotificationTypes } from "../../../push_notifications/PushNotificationConstants";
import { OpenThreadAnalyticsLocations } from "../../../threads/ThreadConstants";
import * as _MarkupReactLinkUtils from "../../../markup/MarkupReactLinkUtils";
import parseURL from "../../../../utils/native/parseURL";
import { isGuildScheduledEventInviteEmbed } from "../../../instant_invite/InviteTypeUtils";
import handleAcceptEventInstantInvite from "../../../guild_scheduled_events/native/handleAcceptEventInstantInvite";
import { GameProfileSources } from "../../../game_profile/GameProfileAnalyticUtils";
import * as _GameProfileActionCreators_native from "../../../game_profile/GameProfileActionCreators.native";
import { handleClick } from "../../../../utils/MaskedLinkUtils";
import { isAlertOrActionSheetOpen } from "../../../../components_native/chat/isAlertOrActionSheetOpen";
import showUserProfileActionSheet from "../../../user_profile/native/showUserProfileActionSheet";
import ActionSheetActionCreators from "../../../action_sheet/native/ActionSheetActionCreators";
import SelectedChannelActionCreators from "../../../../actions/SelectedChannelActionCreators";
import { watchStreamAndTransitionToStream } from "../../../../actions/StreamActionCreators";
import openPinnedMessages from "../openPinnedMessages";
import showChatGDMCustomizeActionSheet from "../../../group_dm/native/showChatGDMCustomizeActionSheet";
import { removeAutomodMessageNotice } from "../../../guild_automod/GuildAutomodMessageActionCreators";
import MessageActionCreators from "../../../../actions/MessageActionCreators";
import AnalyticsLocation from "../../../app_analytics/AnalyticsLocation";
import { isPrimaryEntryPointCommandMessage } from "../../../applications/ApplicationInteractionInfoUtils";
import { KeyboardTypes } from "../../../keyboard/native/KeyboardTypes";
import showExecutedApplicationCommandPopout from "../../../application_commands/native/showExecutedApplicationCommandPopout";
import { getUserAuthor } from "../../useMessageAuthor";
import { transitionTo } from "../../../routing/router_utils";
import { trackRoleSubscriptionPurchaseMessageTierClick } from "../../../guild_role_subscriptions/GuildRoleSubscriptionSystemMessageUtils";
import { openGuildHighlightNotificationForPush } from "../../../notifications/native/GuildHighlightsNotificationsActionCreators";
const handleMessagesTapURLLink = function handleMessagesTapURLLink(data, a1) {
let r3 = data.url != null && data.url !== "";
if (r3) {
const { url, node } = data;
const r1 = node == null;
let r2 = false;
if (!r1) {
const isLinkTrusted = _MarkupReactLinkUtils.isLinkTrusted(node);
r2 = false;
if (isLinkTrusted) {
const payload = parseURL(url).payload;
const type = payload.type;
const INVITE = LinkingTypes.INVITE;
r2 = false;
if (type === INVITE) {
const r31 = payload.inviteCode == null;
r2 = false;
if (!r31) {
const invite = InviteStore.getInvite(payload.inviteCode);
let r36 = invite == null || !isGuildScheduledEventInviteEmbed(invite);
if (!r36) {
handleAcceptEventInstantInvite(invite);
r36 = 0;
}
r2 = !r36;
}
}
}
}
if (!r2) {
const payload2 = parseURL(data.url).payload;
const type2 = payload2.type;
const GAME_PROFILE = LinkingTypes.GAME_PROFILE;
let r4 = false;
if (type2 === GAME_PROFILE) {
const gameId = payload2.gameId;
const r57 = a1 != null;
let sourceUserId = void 0;
if (r57) {
const r60 = data.messageId != null;
sourceUserId = void 0;
if (r60) {
const message = MessageStore.getMessage(a1, data.messageId);
sourceUserId = message == null ? void 0 : message.author.id;
}
}
_GameProfileActionCreators_native.default.openGameProfileModal({
gameId,
source: GameProfileSources.Deeplink,
sourceUserId,
gameProfileModalChecks: {
shouldOpenGameProfile: true,
gameId
}
});
r4 = true;
}
r2 = r4;
}
r3 = true;
if (!r2) {
handleClick({
href: data.url,
trusted: data.node != null && _MarkupReactLinkUtils.isLinkTrusted(data.node),
messageId: data.messageId,
channelId: a1
});
r3 = true;
}
}
return r3;
};
export { handleMessagesTapURLLink };
export function handleMessagesTapLink(a0) {
L90: {
const { allowWithinModal, chatInputRef, handleTransitionToThread, message, messageChannel, selectedChannelId } = a0;
const data = a0.tapLinkData.data;
if (!(allowWithinModal !== true && isAlertOrActionSheetOpen(selectedChannelId)) && !handleMessagesTapURLLink(data, messageChannel?.id) && data.action != null) {
switch (data.action) {
case "bindUserMenu":
showUserProfileActionSheet({
userId: data.userId,
channelId: data.messageChannelId,
messageId: data.messageId
});
break L90;
case "bindGuildMenu":
if (data.messageReference == null) {
return void 0;
}
const guild_id2 = data.messageReference.guild_id;
if (guild_id2 == null) {
return void 0;
}
ActionSheetActionCreators.openLazy(import("../../../guild_profile/native/components/GuildProfileActionSheet"), `GuildProfileActionSheet:${guild_id2}`, {
guildId: guild_id2
});
break L90;
case "bindJoinStream":
const stream = data.stream;
if (stream == null) {
return void 0;
}
SelectedChannelActionCreators.selectVoiceChannel(stream.channelId);
watchStreamAndTransitionToStream(stream);
break L90;
case "bindOpenPins":
openPinnedMessages(data.messageChannelId, "pinned-message-system-message");
break L90;
case "bindOpenGdmCustomizeActionSheet":
showChatGDMCustomizeActionSheet({
channelId: data.messageChannelId
});
break L90;
case "bindDismissMessage":
if (GuildAutomodMessageStore.getMessage(data.message?.id)?.isBlockedEdit) {
removeAutomodMessageNotice(data.message?.id);
break L90;
}
MessageActionCreators.dismissAutomatedMessage(data.message);
break L90;
case "bindTapUsername":
showUserProfileActionSheet({
userId: data.userId,
channelId: data.messageChannelId,
messageId: data.messageId,
sourceAnalyticsLocations: [AnalyticsLocation.USERNAME]
});
break L90;
case "bindTapCommandName":
if (message?.interaction != null && messageChannel != null) {
const user = UserStore.getUser(data.userId);
if (user == null) {
return void 0;
}
if (isPrimaryEntryPointCommandMessage(message)) {
if (message.applicationId == null) {
return void 0;
}
const channel2 = ChannelStore.getChannel(data.messageChannelId);
if (channel2 == null) {
return void 0;
}
const section = getSection({
channel: channel2,
type: "channel"
}, message.applicationId);
if (section.descriptor?.application != null) {
if (chatInputRef == null) {
break L90;
}
const current4 = chatInputRef.current;
if (current4 == null) {
break L90;
}
const isGuildInstalled = section.isGuildInstalled;
current4.openCustomKeyboard({
type: KeyboardTypes.APP_LAUNCHER,
context: {
initialRouteName: AppLauncherRouteName.APPLICATION_VIEW,
initiallyExpanded: true,
application: section.descriptor.application,
installOnDemand: isGuildInstalled ? !isGuildInstalled : !section.isUserInstalled
}
});
break L90;
}
if (chatInputRef == null) {
break L90;
}
const current3 = chatInputRef.current;
if (current3 == null) {
break L90;
}
current3.openCustomKeyboard({
type: KeyboardTypes.APP_LAUNCHER,
context: {
initialRouteName: AppLauncherRouteName.APPLICATION_VIEW,
initiallyExpanded: true,
applicationId: message.applicationId,
installOnDemand: true
}
});
break L90;
}
if (message?.author == null) {
break L90;
}
const r189 = {
author: getUserAuthor(message.interaction.user, messageChannel),
channelId: data.messageChannelId,
chatInputRef,
messageId: data.messageId,
user,
applicationUser: new UserRecord(message?.author),
guildId: null,
messageType: null
};
let guildId = messageChannel.getGuildId();
if (guildId == null) {
guildId = void 0;
}
r189.guildId = guildId;
r189.messageType = data.messageType;
showExecutedApplicationCommandPopout(r189);
break L90;
}
return void 0;
case "bindTapActivityText":
const application = ApplicationStore.getApplication(data.applicationUserId);
if (chatInputRef == null) {
break L90;
}
const current2 = chatInputRef.current;
if (current2 == null) {
break L90;
}
current2.openCustomKeyboard(application == null ? {
type: KeyboardTypes.APP_LAUNCHER,
context: {
initialRouteName: AppLauncherRouteName.APPLICATION_VIEW,
applicationId: data.applicationUserId,
initiallyExpanded: true
}
} : {
type: KeyboardTypes.APP_LAUNCHER,
context: {
initialRouteName: AppLauncherRouteName.APPLICATION_VIEW,
application,
initiallyExpanded: true
}
});
break L90;
case "bindOpenThreadChannel":
const channel = ChannelStore.getChannel(data.threadId);
if (channel == null) {
break L90;
}
handleTransitionToThread(channel?.guild_id, channel.id, OpenThreadAnalyticsLocations.EMBED);
break L90;
case "bindJumpToMessage":
MessageActionCreators.jumpToMessage({
channelId: data.targetChannelId,
messageId: data.targetMessageId,
flash: true,
returnMessageId: data.messageId
});
break L90;
case "bindOpenRoleSubscriptionOverview":
transitionTo(Routes.CHANNEL(data.guildId, StaticChannelRoute.ROLE_SUBSCRIPTIONS));
trackRoleSubscriptionPurchaseMessageTierClick(data.guildId, data.channelId, data.messageId, data.roleSubscriptionListingId);
break L90;
case "bindUserSurvey":
const guild_id = ChannelStore.getChannel(data.message.channel_id)?.guild_id;
if (guild_id == null) {
break L90;
}
const notificationType = data.notificationType;
if (NotificationTypes.TRENDING_CONTENT_PUSH === notificationType) {
const { message: message2, notificationType: notificationType3 } = data;
const MESSAGE_EMBED = AnalyticsLocations.MESSAGE_EMBED;
let summary_id = SummaryStore.selectedSummary(data.message.channel_id)?.id;
if (summary_id == null) {
summary_id = "unknown";
}
openGuildHighlightNotificationForPush(guild_id, message2, notificationType3, MESSAGE_EMBED, {
summary_id
});
break L90;
}
if (NotificationTypes.TOP_MESSAGE_PUSH === notificationType) {
openGuildHighlightNotificationForPush(guild_id, data.message, data.notificationType, AnalyticsLocations.MESSAGE_EMBED);
break L90;
}
const r13 = import("../../../notifications/native/NotificationSurveyActionSheet");
let notificationType2 = data.notificationType;
if (notificationType2 == null) {
notificationType2 = NotificationTypes.TOP_MESSAGE_PUSH;
}
ActionSheetActionCreators.openLazy(r13, "NotificationSurvey", {
location: AnalyticsLocations.MESSAGE_EMBED,
messageId: data.message.id,
notificationType: notificationType2
});
break L90;
case "bindInsertText":
if (chatInputRef == null) {
break L90;
}
const current = chatInputRef.current;
if (current == null) {
break L90;
}
const text = data.text;
let addSpace = data.addSpace;
if (addSpace == null) {
addSpace = true;
}
current.insertText(text, null, addSpace);
break L90;
default:
}
}
}
}