70 lines
2.1 KiB
TypeScript
70 lines
2.1 KiB
TypeScript
// Module ID: 5657
|
|
// Function ID: 5658
|
|
// Name: getChannelIdForGuildTransition
|
|
// Dependencies: [5115, 1372, 1932, 1862, 1931, 5658, 676, 1379, 5662, 5664, 5666, 2]
|
|
// Exports: getChannelIdForGuildTransition
|
|
|
|
// Module 5657 (getChannelIdForGuildTransition)
|
|
import shouldShowOnboarding from "shouldShowOnboarding";
|
|
import ensureGuildLoaded from "ensureGuildLoaded";
|
|
import comparator from "comparator";
|
|
import createGuildRecordFromRust from "createGuildRecordFromRust";
|
|
import handleConnectionOpen from "handleConnectionOpen";
|
|
import makeSortedChannel from "makeSortedChannel";
|
|
import { ME } from "ME";
|
|
import { StaticChannelRoute } from "set";
|
|
|
|
const require = arg1;
|
|
const result = require("comparator").fileFinishedImporting("modules/routing/getChannelIdForGuildTransition.tsx");
|
|
|
|
export const getChannelIdForGuildTransition = function getChannelIdForGuildTransition(id) {
|
|
channelId = channelId.getChannelId(id);
|
|
defaultChannel = defaultChannel.getDefaultChannel(id);
|
|
id = undefined;
|
|
if (defaultChannel != null) {
|
|
id = defaultChannel.id;
|
|
}
|
|
if (id == null) {
|
|
let tmp5;
|
|
if (id === ME) {
|
|
privateChannelIds = privateChannelIds.getPrivateChannelIds();
|
|
let first;
|
|
if (privateChannelIds.length > 0) {
|
|
first = privateChannelIds[0];
|
|
}
|
|
tmp5 = first;
|
|
}
|
|
id = tmp5;
|
|
}
|
|
if (channelId === StaticChannelRoute.GUILD_ONBOARDING) {
|
|
if (!shouldShowOnboarding.shouldShowOnboarding(id)) {
|
|
return id;
|
|
}
|
|
}
|
|
if (channelId === StaticChannelRoute.GUILD_HOME) {
|
|
if (!obj.canSeeOnboardingHome(id)) {
|
|
return id;
|
|
}
|
|
obj = require(5662) /* useCanSeeOnboardingHome */;
|
|
}
|
|
if (channelId === StaticChannelRoute.GUILD_SPACE) {
|
|
if (obj4.canUseGuildSpace(guild.getGuild(id), "getChannelIdForGuildTransition")) {
|
|
id = channelId;
|
|
}
|
|
return id;
|
|
} else {
|
|
if (channelId === tmp8.GAME_SHOP) {
|
|
if (obj2.canSeeGameShop(id)) {
|
|
return channelId;
|
|
}
|
|
obj2 = require(5666) /* getPrice */;
|
|
}
|
|
channel = channel.getChannel(channelId);
|
|
if (null == channel) {
|
|
let tmp15 = id;
|
|
} else {
|
|
tmp15 = channelId;
|
|
}
|
|
return tmp15;
|
|
}
|
|
};
|