863 lines
33 KiB
TypeScript
863 lines
33 KiB
TypeScript
// Metro module 12988 (f12989).
|
|
import { addPostConnectionCallback } from "../../gateway/PostConnectionCallbackStore";
|
|
import GuildScheduledEventStore from "../../guild_scheduled_events/GuildScheduledEventStore";
|
|
import { handleMobileWebCheckoutStatus } from "../../premium/native/PremiumPlanPurchasedStore";
|
|
import PremiumNitroNavigationStore from "../../user_settings/premium/native/PremiumNitroNavigationStore";
|
|
import AuthenticationStore from "../../../stores/AuthenticationStore";
|
|
import { AnalyticEvents, LinkingTypes, PlatformTypes, Routes, UserSettingsSections } from "../../../Constants";
|
|
import { StaticChannelRoute } from "../../channel/ChannelConstants";
|
|
import { StreamTypes } from "../../go_live/Constants";
|
|
import { NativePermissionTypes } from "../../native_permissions/NativePermissionConstants";
|
|
import { OAUTH2_AUTHORIZE_MODAL_KEY } from "../../oauth2/native/Constants";
|
|
import { FAMILY_CENTER_LINK_REQUEST_REGEX } from "../../parent_tools/FamilyCenterConstants";
|
|
import { MobileWebRedirectCheckoutDeepLinkActions } from "../../payments/PaymentConstants";
|
|
import { SHARE_SCREEN_MODAL_KEY } from "../../share/native/ShareScreenConstants";
|
|
import { AccountSettingsTabs } from "../../user_settings/account/native/SettingsAccountConstants";
|
|
import { MobileSetting } from "../../user_settings/core/native/SettingsConstants";
|
|
import { openContactSyncModalDeeplink } from "../../contact_sync/native/ContactSyncModalActionCreators";
|
|
import ModalActionCreators from "../../../actions/ModalActionCreators";
|
|
import { getRootNavigationRef } from "../../main_tabs_v2/RootNavigationRef.native";
|
|
import AddFriendModalActionCreators from "../../../components_native/add_friend/AddFriendModalActionCreators";
|
|
import { showUserProfileActionSheetPostConnection } from "../../user_profile/native/showUserProfileActionSheet";
|
|
import { openUserSettings } from "../../user_settings/core/native/openUserSettings";
|
|
import { showInvite, clearDisplayedInvite } from "../../../actions/native/DisplayedInviteActionCreators";
|
|
import GuildTemplateActionCreators from "../../guild_templates/native/GuildTemplateActionCreators";
|
|
import { dismissGlobalKeyboard } from "../../../utils/native/KeyboardManagerUtils";
|
|
import { resolveGiftCode } from "../../../actions/GiftCodeActionCreators";
|
|
import AnalyticsUtils from "../../../utils/AnalyticsUtils";
|
|
import { openGiftCodeRedeemModal } from "../../../actions/native/GiftCodeActionCreators";
|
|
import { startDiceRoll } from "../../dice_roll/DiceRollActionCreators";
|
|
import handleContentLinking from "./handleContentLinking";
|
|
import { handleFamilyCenterQRCodeScan } from "../../parent_tools/native/FamilyCenterNativeUtils";
|
|
import { isMidjourneyOnboardingFlow } from "../../midjourney_onboarding/MidjourneyOnboardingUtils";
|
|
import CreateGuildModalActionCreators from "../../create_guild/native/CreateGuildModalActionCreators";
|
|
import authorizeCallback from "../../oauth2/native/authorizeCallback";
|
|
import { openOAuth2Modal } from "../../../utils/native/ApplicationUtils";
|
|
import { isMetaQuest } from "../../device/MetaQuestUtils.android";
|
|
import NativePermissionUtils from "../../native_permissions/NativePermissionUtils";
|
|
import Linking from "../../../lib/native/Linking";
|
|
import { transitionToGuild } from "../../routing/transitionToGuild.native";
|
|
import GuildScheduledEventsActionCreators from "../../guild_scheduled_events/GuildScheduledEventsActionCreators";
|
|
import { openGuildEventDetails } from "../../guild_scheduled_events/GuildScheduledEventModalActionCreators.native";
|
|
import MobileWebHandoffLinking from "../../mobile_web_handoff/native/MobileWebHandoffLinking";
|
|
import transitionToStream_native from "../../go_live/utils/transitionToStream.native";
|
|
import { disconnectRemote } from "../../game_console/GameConsoleActionCreators";
|
|
import { navigateToRootTab } from "../../main_tabs_v2/helpers/NavigationRouteUtils.native";
|
|
import { stringify } from "../../../_bundle/keysSorter";
|
|
import { transitionTo } from "../../routing/router_utils";
|
|
import Dispatcher from "../../../Dispatcher";
|
|
import ConnectedAccountsActionCreators from "../../../actions/ConnectedAccountsActionCreators";
|
|
import URLUtils from "../../../utils/URLUtils";
|
|
import GuildSettingsActionCreators from "../../guild_settings/GuildSettingsActionCreators";
|
|
import ActivateDeviceModalActionCreators from "../../activate_device/native/ActivateDeviceModalActionCreators";
|
|
import { openGuildSettingsPickerModal } from "../../guild_settings_picker/GuildSettingsPickerActionCreators.native";
|
|
import * as _PlatformUtils from "../../../utils/PlatformUtils";
|
|
import { showInstantInviteActionSheetForChannel } from "../../instant_invite/native/InstantInviteUtils";
|
|
import { openBuildInstallerUrl } from "../../mobile_native_updater/MobileNativeUpdateUtils";
|
|
import { fetchSubscriptions } from "../../billing/actions/BillingActionCreators";
|
|
import openGuildActionSheet from "../../guild_action_sheet/native/openGuildActionSheet";
|
|
import { openCollectiblesShopMobile } from "../../collectibles/CollectiblesActionCreators";
|
|
import AnalyticsLocation from "../../app_analytics/AnalyticsLocation";
|
|
import SecureFramesPlatformUtils_native from "../../rtc/SecureFramesPlatformUtils.native";
|
|
import { trackQuestEvent } from "../../quests/lib/analytics/AnalyticsActions";
|
|
import { QuestContent } from "../../../_bundle/Module5038";
|
|
import { openQuestHome } from "../../quests/native/QuestUtils.native";
|
|
import { openGiftModal } from "../../premium/native/utils/openGiftModal";
|
|
import openActivityDMLauncher from "../../activities/native/openActivityDMLauncher";
|
|
import { openApplyBoostModal } from "../../../actions/native/BoostingActionCreators";
|
|
import closeVoicePanels from "../../voice_panel/native/utils/closeVoicePanels";
|
|
import { GameProfileSources } from "../../game_profile/GameProfileAnalyticUtils";
|
|
import * as _GameProfileActionCreators_native from "../../game_profile/GameProfileActionCreators.native";
|
|
import { browserManagerCloseBrowser } from "./BrowserManager";
|
|
import { $forInKeys } from "../../../_hermes/prelude";
|
|
const _excluded = ["code", "state"];
|
|
export default function handleSupportedURL(a0) {
|
|
let r0;
|
|
let payload, rootNavigationRef, rootNavigationRef2, inviteCode, username, deeplinkAttemptId, guildTemplateCode, pathname, remoteAuthFingerprint, deepLinkAction, gameId, rootNavigationRef3;
|
|
L142: {
|
|
payload = a0.payload;
|
|
const { safe, navigationReplace, waitForConnection, skipMessageFetch } = a0;
|
|
rootNavigationRef = void 0;
|
|
rootNavigationRef2 = void 0;
|
|
inviteCode = void 0;
|
|
username = void 0;
|
|
deeplinkAttemptId = void 0;
|
|
guildTemplateCode = void 0;
|
|
pathname = void 0;
|
|
remoteAuthFingerprint = void 0;
|
|
deepLinkAction = void 0;
|
|
gameId = void 0;
|
|
rootNavigationRef3 = void 0;
|
|
const type = payload.type;
|
|
if (LinkingTypes.CONTACT_SYNC === type) {
|
|
openContactSyncModalDeeplink();
|
|
r0 = true;
|
|
} else if (LinkingTypes.COMPOSE_MESSAGE === type) {
|
|
ModalActionCreators.popAll();
|
|
const rootNavigationRef4 = getRootNavigationRef();
|
|
const r486 = rootNavigationRef4 == null;
|
|
r0 = true;
|
|
if (!r486) {
|
|
rootNavigationRef4.navigate("friends", {
|
|
screen: "new-message",
|
|
params: {
|
|
sourcePage: "Deeplink"
|
|
}
|
|
});
|
|
r0 = true;
|
|
}
|
|
} else if (LinkingTypes.ADD_FRIENDS === type) {
|
|
ModalActionCreators.popAll();
|
|
rootNavigationRef = getRootNavigationRef();
|
|
if (rootNavigationRef == null) {
|
|
AddFriendModalActionCreators.openAddFriendModalDeeplink();
|
|
r0 = true;
|
|
} else if (rootNavigationRef.isReady()) {
|
|
rootNavigationRef.navigate("friends", {
|
|
screen: "add-friends",
|
|
params: {
|
|
sourcePage: "Deeplink"
|
|
}
|
|
});
|
|
r0 = true;
|
|
} else {
|
|
addPostConnectionCallback(() => rootNavigationRef.navigate("friends", {
|
|
screen: "add-friends",
|
|
params: {
|
|
sourcePage: "Deeplink"
|
|
}
|
|
}));
|
|
r0 = true;
|
|
}
|
|
} else if (LinkingTypes.FRIENDS === type) {
|
|
ModalActionCreators.popAll();
|
|
rootNavigationRef2 = getRootNavigationRef();
|
|
if (rootNavigationRef2 != null) {
|
|
if (rootNavigationRef2.isReady()) {
|
|
rootNavigationRef2.navigate("friends");
|
|
} else {
|
|
addPostConnectionCallback(() => {
|
|
rootNavigationRef2.navigate("friends");
|
|
});
|
|
}
|
|
}
|
|
const r441 = payload.userId != null;
|
|
r0 = true;
|
|
if (r441) {
|
|
showUserProfileActionSheetPostConnection({
|
|
userId: payload.userId
|
|
});
|
|
r0 = true;
|
|
}
|
|
} else if (LinkingTypes.EDIT_PROFILE === type) {
|
|
addPostConnectionCallback(() => {
|
|
ModalActionCreators.popAll();
|
|
openUserSettings({
|
|
screen: UserSettingsSections.PROFILE_CUSTOMIZATION
|
|
});
|
|
});
|
|
r0 = true;
|
|
} else if (LinkingTypes.INVITE === type) {
|
|
inviteCode = payload.inviteCode;
|
|
username = payload.username;
|
|
deeplinkAttemptId = payload.deeplinkAttemptId;
|
|
if (!AuthenticationStore.isAuthenticated() && inviteCode != null) {
|
|
showInvite(inviteCode, username, {
|
|
deeplinkAttemptId,
|
|
fromDeeplink: true,
|
|
location: "Deep Link"
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
addPostConnectionCallback(() => {
|
|
GuildTemplateActionCreators.hideModal();
|
|
if (inviteCode != null) {
|
|
dismissGlobalKeyboard();
|
|
showInvite(inviteCode, username, {
|
|
deeplinkAttemptId,
|
|
fromDeeplink: true,
|
|
location: "Deep Link"
|
|
});
|
|
}
|
|
});
|
|
r0 = true;
|
|
} else if (LinkingTypes.GUILD_TEMPLATE === type) {
|
|
guildTemplateCode = payload.guildTemplateCode;
|
|
addPostConnectionCallback(() => {
|
|
clearDisplayedInvite();
|
|
if (guildTemplateCode != null) {
|
|
dismissGlobalKeyboard();
|
|
GuildTemplateActionCreators.showModal(guildTemplateCode);
|
|
}
|
|
});
|
|
r0 = true;
|
|
} else if (LinkingTypes.GIFT_CODE === type) {
|
|
const giftCode = payload.giftCode;
|
|
let r383 = giftCode != null;
|
|
if (r383) {
|
|
resolveGiftCode(giftCode).then(({ giftCode }) => {
|
|
AnalyticsUtils.track(AnalyticEvents.OPEN_MODAL, {
|
|
type: "gift_accept",
|
|
location: null
|
|
});
|
|
openGiftCodeRedeemModal(giftCode.code);
|
|
}).catch(() => {});
|
|
r383 = true;
|
|
}
|
|
r0 = r383;
|
|
} else if (LinkingTypes.ROLL_DICE === type) {
|
|
const { guildId: guildId2, channelId: channelId2, diceCount, diceSides } = payload;
|
|
let r368 = guildId2 != null && channelId2 != null;
|
|
if (r368) {
|
|
startDiceRoll(channelId2, diceCount, diceSides);
|
|
handleContentLinking({
|
|
guildId: guildId2,
|
|
channelId: channelId2,
|
|
messageId: void 0,
|
|
navigationSettings: {
|
|
safe,
|
|
navigationReplace,
|
|
waitForConnection,
|
|
skipMessageFetch
|
|
}
|
|
});
|
|
r368 = true;
|
|
}
|
|
r0 = r368;
|
|
} else {
|
|
if (LinkingTypes.CHANNEL !== type && LinkingTypes.MESSAGE !== type) {
|
|
if (LinkingTypes.SESSION_MANAGEMENT === type) {
|
|
addPostConnectionCallback(() => {
|
|
ModalActionCreators.popAll();
|
|
openUserSettings({
|
|
screen: UserSettingsSections.SESSIONS
|
|
});
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.FAMILY_CENTER === type) {
|
|
const pathname2 = (payload == null ? {} : payload).pathname;
|
|
pathname = pathname2 !== void 0 ? pathname2 : null;
|
|
addPostConnectionCallback(() => {
|
|
ModalActionCreators.popAll();
|
|
openUserSettings({
|
|
screen: UserSettingsSections.FAMILY_CENTER
|
|
});
|
|
if (pathname != null && FAMILY_CENTER_LINK_REQUEST_REGEX.test(pathname)) {
|
|
handleFamilyCenterQRCodeScan(pathname, "NativeCameraScan");
|
|
}
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.OAUTH2_AUTHORIZE === type) {
|
|
addPostConnectionCallback(() => {
|
|
ModalActionCreators.popAll();
|
|
if (isMidjourneyOnboardingFlow()) {
|
|
CreateGuildModalActionCreators.openCreateGuildModal(function(a0) {
|
|
if (payload.type === LinkingTypes.OAUTH2_AUTHORIZE) {
|
|
ModalActionCreators.popAll();
|
|
ModalActionCreators.pushLazy(import("../../oauth2/native/OAuth2AuthorizeModal"), {
|
|
...payload.props,
|
|
guildId: a0,
|
|
callback: authorizeCallback,
|
|
dismissOAuthModal: () => {
|
|
ModalActionCreators.popWithKey(OAUTH2_AUTHORIZE_MODAL_KEY);
|
|
}
|
|
}, OAUTH2_AUTHORIZE_MODAL_KEY);
|
|
}
|
|
});
|
|
} else {
|
|
openOAuth2Modal({
|
|
...payload.props,
|
|
callback: authorizeCallback
|
|
});
|
|
}
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.ONE_TIME_LOGIN === type) {
|
|
ModalActionCreators.popAll();
|
|
ModalActionCreators.pushLazy(import("../../one_time_login/native/OneTimeLoginModal"), {
|
|
token: payload.token
|
|
}, "ONE_TIME_LOGIN_MODAL");
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.REMOTE_AUTH === type) {
|
|
remoteAuthFingerprint = payload.remoteAuthFingerprint;
|
|
addPostConnectionCallback(remoteAuthFingerprint != null ? () => {
|
|
ModalActionCreators.pushLazy(import("../../remote_auth/components/native/RemoteAuthModal"), {
|
|
remoteAuthFingerprint
|
|
}, "REMOTE_AUTH_MODAL");
|
|
} : () => {
|
|
NativePermissionUtils.requestPermission(isMetaQuest() ? NativePermissionTypes.HEADSET_CAMERA : NativePermissionTypes.CAMERA).then((result) => {
|
|
if (result) {
|
|
ModalActionCreators.pushLazy(import("../../../components_native/QRScannerModal"), {
|
|
showHelp: true
|
|
});
|
|
}
|
|
}).catch(() => {});
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.PROMOTIONS === type) {
|
|
Linking.performURLNavigation(payload.url);
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.FEATURE_PROMO_URL === type) {
|
|
Linking.openURLExternally(payload.promoUrl);
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.USER_PROFILE === type) {
|
|
const r288 = payload.userId != null;
|
|
r0 = true;
|
|
if (!r288) {
|
|
break L142;
|
|
}
|
|
showUserProfileActionSheetPostConnection({
|
|
userId: payload.userId
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.BUILD_OVERRIDE === type) {
|
|
const overrideUrl = payload.overrideUrl;
|
|
ModalActionCreators.popAll();
|
|
ModalActionCreators.pushLazy(import("../../build_overrides/native/BuildOverrideModal"), {
|
|
overrideUrl
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.GUILD_EVENT_DETAILS === type) {
|
|
addPostConnectionCallback(async () => {
|
|
let c30599_2;
|
|
c30599_2 = void 0;
|
|
ModalActionCreators.popAll();
|
|
let c31671_0 = payload.guildId;
|
|
let c31671_1 = payload.guildEventId;
|
|
if ((await import("../../../stores/GuildStore")).default.getGuild(c31671_0) != null) {
|
|
transitionToGuild(c31671_0);
|
|
}
|
|
let guildScheduledEvent = GuildScheduledEventStore.getGuildScheduledEvent(c31671_1);
|
|
if (guildScheduledEvent == null) {
|
|
guildScheduledEvent = await GuildScheduledEventsActionCreators.fetchGuildEvent(c31671_0, c31671_1);
|
|
}
|
|
let c31671_2 = guildScheduledEvent;
|
|
if (c31671_2 != null) {
|
|
openGuildEventDetails({
|
|
eventId: c31671_2.id,
|
|
event: c31671_2
|
|
});
|
|
}
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.MOBILE_WEB_HANDOFF === type) {
|
|
const { nonce, redirectUrl } = payload;
|
|
MobileWebHandoffLinking.redirectWithHandoffToken(`${redirectUrl.pathname}${redirectUrl.search}`, {
|
|
nonce,
|
|
fingerprint: payload.fingerprint,
|
|
skipLoginRedirect: true
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.VOICE_CHANNEL === type) {
|
|
addPostConnectionCallback(async () => {
|
|
let c30600_0;
|
|
L27: {
|
|
c30600_0 = void 0;
|
|
if (payload.guildId != null && payload.channelId != null && payload.userId != null) {
|
|
ModalActionCreators.popAll();
|
|
if ((await import("../../../stores/GuildStore")).default.getGuild(payload.guildId) != null) {
|
|
transitionToGuild(payload.guildId);
|
|
}
|
|
transitionToStream_native({
|
|
streamType: StreamTypes.GUILD,
|
|
ownerId: payload.userId,
|
|
guildId: payload.guildId,
|
|
channelId: payload.channelId
|
|
});
|
|
if (!(payload.action === "transfer_cancelled" && payload.via === "xbox")) {
|
|
break L27;
|
|
}
|
|
disconnectRemote();
|
|
break L27;
|
|
}
|
|
if (payload.action === "transfer_cancelled" && payload.via === "xbox") {
|
|
disconnectRemote();
|
|
}
|
|
return void 0;
|
|
}
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.ICYMI === type) {
|
|
addPostConnectionCallback(() => {
|
|
navigateToRootTab({
|
|
screen: "icymi"
|
|
});
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.GUILD_HOME === type) {
|
|
const r4 = payload.guildId != null;
|
|
r0 = true;
|
|
if (!r4) {
|
|
break L142;
|
|
}
|
|
const r215 = payload.highlightChannelId != null ? payload.highlightMessageId != null ? {
|
|
search: stringify({
|
|
highlight_channel_id: payload.highlightChannelId,
|
|
highlight_message_id: payload.highlightMessageId
|
|
})
|
|
} : void 0 : void 0;
|
|
transitionTo(Routes.CHANNEL(payload.guildId, StaticChannelRoute.GUILD_HOME), r215);
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.USER_CONNECTIONS_LINK_CALLBACK === type) {
|
|
addPostConnectionCallback(() => {
|
|
if (payload.callbackCode != null && payload.callbackState != null && payload.provider != null && [PlatformTypes.XBOX, PlatformTypes.PLAYSTATION, PlatformTypes.PLAYSTATION_STAGING, PlatformTypes.CRUNCHYROLL].includes(payload.provider)) {
|
|
Dispatcher.dispatch({
|
|
type: "USER_CONNECTIONS_LINK_CALLBACK",
|
|
provider: payload.provider,
|
|
callbackCode: payload.callbackCode,
|
|
callbackState: payload.callbackState
|
|
});
|
|
}
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.USER_CONNECTIONS_CALLBACK === type) {
|
|
addPostConnectionCallback(async () => {
|
|
let openid_params;
|
|
let c30601_0, c30601_1, c30601_2, c30601_3, c30601_6;
|
|
let c31672_0, c31672_1;
|
|
L27: {
|
|
c30601_6 = void 0;
|
|
c31672_0 = void 0;
|
|
c31672_1 = void 0;
|
|
const { provider, searchParams } = payload;
|
|
const { code, state, ...rest } = searchParams;
|
|
if (state != null) {
|
|
const r44 = {
|
|
code,
|
|
state
|
|
};
|
|
c30601_1 = rest;
|
|
const r47 = $forInKeys(rest);
|
|
const r48 = 0;
|
|
const length = r47.length;
|
|
if (r47 === void 0) {
|
|
c30601_3 = length;
|
|
c30601_2 = r48;
|
|
c30601_1 = rest;
|
|
c30601_0 = r47;
|
|
openid_params = void 0;
|
|
} else {
|
|
c30601_3 = length;
|
|
c30601_2 = r48;
|
|
c30601_1 = rest;
|
|
c30601_0 = r47;
|
|
let r23 = void 0;
|
|
while (true) {
|
|
const r18 = c30601_0;
|
|
const r19 = c30601_1;
|
|
let r20 = c30601_2;
|
|
const r21 = c30601_3;
|
|
openid_params = r23;
|
|
const r56 = r20 < r21 ? r18[r20++] : void 0;
|
|
if (r56 === void 0) {
|
|
c30601_3 = r21;
|
|
c30601_2 = r20;
|
|
c30601_1 = r19;
|
|
c30601_0 = r18;
|
|
break;
|
|
}
|
|
c30601_3 = r21;
|
|
c30601_2 = r20;
|
|
c30601_1 = r19;
|
|
c30601_0 = r18;
|
|
const r61 = r56.startsWith("openid.");
|
|
r23 = openid_params;
|
|
if (r61) {
|
|
const r62 = openid_params == null ? {} : openid_params;
|
|
r62[r56] = searchParams[r56];
|
|
r23 = r62;
|
|
}
|
|
}
|
|
}
|
|
if (openid_params != null) {
|
|
r44.openid_params = openid_params;
|
|
}
|
|
ModalActionCreators.popAll();
|
|
openUserSettings({
|
|
screen: UserSettingsSections.CONNECTIONS
|
|
});
|
|
c31672_0 = await ConnectedAccountsActionCreators.callback(provider, r44);
|
|
c31672_1 = URLUtils.toURLSafe(c31672_0.body?.redirect);
|
|
if (c31672_1 == null) {
|
|
break L27;
|
|
}
|
|
Linking.openURL(c31672_1.toString());
|
|
break L27;
|
|
}
|
|
return void 0;
|
|
}
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.CONNECTIONS === type) {
|
|
addPostConnectionCallback(() => {
|
|
ModalActionCreators.popAll();
|
|
openUserSettings({
|
|
screen: UserSettingsSections.CONNECTIONS
|
|
});
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.GUILD_SETTINGS === type) {
|
|
addPostConnectionCallback(() => {
|
|
if (payload.guildId != null) {
|
|
GuildSettingsActionCreators.open(payload.guildId, payload.settingsSection, void 0, payload.settingsSubsection);
|
|
}
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.ACTIVATE_DEVICE === type) {
|
|
ActivateDeviceModalActionCreators.showModal(payload.userCode);
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.GUILD_SETTINGS_PICKER === type) {
|
|
addPostConnectionCallback(() => {
|
|
openGuildSettingsPickerModal({
|
|
section: payload.settingsSection,
|
|
subsection: payload.settingsSubsection,
|
|
feature: payload.feature
|
|
});
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.SHARE === type) {
|
|
const isIOS = _PlatformUtils.isIOS();
|
|
r0 = true;
|
|
if (!isIOS) {
|
|
break L142;
|
|
}
|
|
ModalActionCreators.popAll();
|
|
ModalActionCreators.pushLazy(import("../../share/native/ShareScreenModal"), {
|
|
text: payload.text,
|
|
channelId: payload.channelId,
|
|
shareId: payload.shareId,
|
|
attachmentManifest: payload.attachmentManifest
|
|
}, SHARE_SCREEN_MODAL_KEY, {
|
|
presentation: "modal"
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.CREATE_VOICE_INVITE !== type && LinkingTypes.SEND_VOICE_HANGOUT_WAVE !== type) {
|
|
if (LinkingTypes.ACCOUNT_STANDING === type) {
|
|
addPostConnectionCallback(() => {
|
|
ModalActionCreators.popAll();
|
|
openUserSettings({
|
|
screen: UserSettingsSections.ACCOUNT,
|
|
params: {
|
|
initialTab: AccountSettingsTabs.STANDING
|
|
}
|
|
});
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.MOBILE_NATIVE_UPDATE === type) {
|
|
openBuildInstallerUrl(payload.url);
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.MOBILE_WEB_REDIRECT_CHECKOUT === type) {
|
|
deepLinkAction = payload.deepLinkAction;
|
|
addPostConnectionCallback(async () => {
|
|
let c30602_1;
|
|
let c31673_0, c31673_1;
|
|
L18: {
|
|
L17: {
|
|
c30602_1 = void 0;
|
|
c31673_0 = void 0;
|
|
c31673_1 = void 0;
|
|
if (deepLinkAction === MobileWebRedirectCheckoutDeepLinkActions.PREMIUM_CHECKOUT_SUCCESS) {
|
|
handleMobileWebCheckoutStatus("succeeded");
|
|
break L18;
|
|
}
|
|
if (deepLinkAction === MobileWebRedirectCheckoutDeepLinkActions.PREMIUM_SUBSCRIPTION_UPDATE) {
|
|
fetchSubscriptions();
|
|
break L18;
|
|
}
|
|
if (deepLinkAction !== MobileWebRedirectCheckoutDeepLinkActions.GUILD_BOOST_CHECKOUT_SUCCESS) {
|
|
break L18;
|
|
}
|
|
ModalActionCreators.popAll();
|
|
c31673_0 = payload.guildId;
|
|
c31673_1 = (await import("../../../stores/GuildStore")).default.getGuild(c31673_0);
|
|
if (c31673_1 == null) {
|
|
break L17;
|
|
}
|
|
transitionToGuild(c31673_0);
|
|
openGuildActionSheet(c31673_1);
|
|
}
|
|
return void 0;
|
|
}
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.SHOP === type) {
|
|
addPostConnectionCallback(() => {
|
|
openCollectiblesShopMobile({
|
|
analyticsLocations: [AnalyticsLocation.DEEPLINK],
|
|
analyticsSource: AnalyticsLocation.DEEPLINK,
|
|
screen: payload.screen,
|
|
initialProductSkuId: payload.skuId
|
|
});
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.AUTHORIZED_APPS === type) {
|
|
addPostConnectionCallback(() => {
|
|
ModalActionCreators.popAll();
|
|
openUserSettings({
|
|
screen: UserSettingsSections.AUTHORIZED_APPS
|
|
});
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.DAVE_PROTOCOL_VERIFICATION === type) {
|
|
addPostConnectionCallback(() => {
|
|
SecureFramesPlatformUtils_native.handleSecureFramesUserVerificationLink({
|
|
userId: payload.userId,
|
|
fingerprint: payload.fingerprint.replaceAll(" ", "+")
|
|
});
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.QUESTS === type) {
|
|
addPostConnectionCallback(() => {
|
|
if (payload.questId != null) {
|
|
trackQuestEvent({
|
|
questId: payload.questId,
|
|
event: AnalyticEvents.QUEST_SHARE_LINK_DEEP_LINKED_INTO_MOBILE_CLIENT,
|
|
sourceQuestContent: QuestContent.QUEST_EMBED_MOBILE,
|
|
properties: {
|
|
referrer_id: payload.referrerId
|
|
}
|
|
});
|
|
}
|
|
const sort = payload?.sort;
|
|
const filter = payload?.filter;
|
|
openQuestHome({
|
|
scrollToQuestId: payload.questId,
|
|
sort: sort != null ? sort !== "" ? sort : null : null,
|
|
filter: filter != null ? filter !== "" ? filter : null : null,
|
|
fromContent: QuestContent.QUEST_SHARE_LINK
|
|
});
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.QUEST_HOME_PREVIEW === type) {
|
|
addPostConnectionCallback(() => {
|
|
openUserSettings({
|
|
screen: UserSettingsSections.QUESTS,
|
|
params: {
|
|
previewAdCreativeIds: payload.adCreativeIds
|
|
}
|
|
});
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.GIFT === type) {
|
|
addPostConnectionCallback(() => {
|
|
openGiftModal({
|
|
analyticsLocations: [AnalyticsLocation.DEEPLINK]
|
|
});
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.NITRO_HOME === type) {
|
|
addPostConnectionCallback(() => {
|
|
let section = payload.section;
|
|
if (section == null) {
|
|
section = void 0;
|
|
}
|
|
PremiumNitroNavigationStore.setState({
|
|
scrollToSectionId: section
|
|
});
|
|
openUserSettings({
|
|
screen: UserSettingsSections.PREMIUM
|
|
});
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.ACTIVITY === type) {
|
|
openActivityDMLauncher(payload.applicationId, payload.referrerId, payload.customId, payload.linkId, payload.isDeepLink);
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.CONNECTED_GAMES === type) {
|
|
addPostConnectionCallback(() => {
|
|
ModalActionCreators.popAll();
|
|
openUserSettings({
|
|
screen: UserSettingsSections.CONTENT_AND_SOCIAL,
|
|
params: {
|
|
tab: MobileSetting.CONNECTED_GAMES
|
|
}
|
|
});
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.BOOST_MARKETING === type) {
|
|
addPostConnectionCallback(() => {
|
|
openApplyBoostModal(payload.guildId);
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.BOOST_SETTINGS === type) {
|
|
addPostConnectionCallback(() => {
|
|
ModalActionCreators.popAll();
|
|
openUserSettings({
|
|
screen: UserSettingsSections.GUILD_BOOSTING
|
|
});
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.QUEST_PREVIEW_TOOL === type) {
|
|
addPostConnectionCallback(() => {
|
|
ModalActionCreators.popAll();
|
|
closeVoicePanels();
|
|
setTimeout(() => {
|
|
openUserSettings({
|
|
screen: UserSettingsSections.QUEST_PREVIEW_TOOL_2,
|
|
params: {
|
|
questId: payload.questId
|
|
}
|
|
});
|
|
}, 1);
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.SUBSCRIPTION_SETTINGS === type) {
|
|
addPostConnectionCallback(() => {
|
|
ModalActionCreators.popAll();
|
|
openUserSettings({
|
|
screen: UserSettingsSections.GUILD_ROLE_SUBSCRIPTIONS
|
|
});
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
if (LinkingTypes.GAME_PROFILE === type) {
|
|
gameId = payload.gameId;
|
|
addPostConnectionCallback(() => {
|
|
ModalActionCreators.popAll();
|
|
_GameProfileActionCreators_native.default.openGameProfileModal({
|
|
gameId,
|
|
source: GameProfileSources.Deeplink,
|
|
gameProfileModalChecks: {
|
|
shouldOpenGameProfile: true,
|
|
gameId
|
|
}
|
|
});
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
const MESSAGE_REQUESTS = LinkingTypes.MESSAGE_REQUESTS;
|
|
r0 = false;
|
|
if (MESSAGE_REQUESTS !== type) {
|
|
break L142;
|
|
}
|
|
ModalActionCreators.popAll();
|
|
rootNavigationRef3 = getRootNavigationRef();
|
|
const r3 = rootNavigationRef3 != null;
|
|
r0 = true;
|
|
if (!r3) {
|
|
break L142;
|
|
}
|
|
if (rootNavigationRef3.isReady()) {
|
|
rootNavigationRef3.navigate("message-requests");
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
addPostConnectionCallback(() => {
|
|
rootNavigationRef3.navigate("message-requests");
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
addPostConnectionCallback(() => {
|
|
showInstantInviteActionSheetForChannel(payload.channelId);
|
|
});
|
|
r0 = true;
|
|
break L142;
|
|
}
|
|
const { guildId, channelId, type: type2 } = payload;
|
|
const MESSAGE = LinkingTypes.MESSAGE;
|
|
let summaryId = void 0;
|
|
let messageId = void 0;
|
|
if (type2 === MESSAGE) {
|
|
messageId = payload.messageId;
|
|
summaryId = payload.summaryId;
|
|
}
|
|
const r355 = guildId != null && channelId != null;
|
|
r0 = true;
|
|
if (r355) {
|
|
handleContentLinking({
|
|
guildId,
|
|
channelId,
|
|
messageId,
|
|
navigationSettings: {
|
|
safe,
|
|
navigationReplace,
|
|
waitForConnection,
|
|
skipMessageFetch
|
|
},
|
|
summaryId
|
|
});
|
|
r0 = true;
|
|
}
|
|
}
|
|
}
|
|
if (r0) {
|
|
browserManagerCloseBrowser();
|
|
}
|
|
return r0;
|
|
};
|