decord/source/modules/routing/getChannelIdForGuildTransition.tsx
2026-08-24 06:08:38 +00:00

79 lines
2.5 KiB
TypeScript

// Module ID: 7235
// Function ID: 7236
// Name: getChannelIdForGuildTransition
// Dependencies: [1394, 6821, 1391, 1981, 1910, 1980, 5393, 676, 1398, 5288, 7236, 7238, 1913, 2]
// Exports: getChannelIdForGuildTransition
// Module 7235 (getChannelIdForGuildTransition)
import getFavoritesAwareGuildName from "getFavoritesAwareGuildName" /* 1913 */;
import useCanSeeOnboardingHome from "useCanSeeOnboardingHome" /* 5288 */;
import getPrice from "getPrice" /* 7238 */;
import closure_2 from "initializeFromUserSettings" /* 1394 */;
import closure_3 from "shouldShowOnboarding" /* 6821 */;
import closure_4 from "ensureGuildLoaded" /* 1391 */;
import closure_5 from "comparator" /* 1981 */;
import closure_6 from "createGuildRecordFromRust" /* 1910 */;
import closure_7 from "handleConnectionOpen" /* 1980 */;
import closure_8 from "makeSortedChannel" /* 5393 */;
import { ME } from "ME" /* 676 */;
import { StaticChannelRoute } from "set" /* 1398 */;
require = arg1;
const result = require("set").fileFinishedImporting("modules/routing/getChannelIdForGuildTransition.tsx");
export const getChannelIdForGuildTransition = function getChannelIdForGuildTransition(guildId) {
channelId = channelId.getChannelId(guildId);
defaultChannel = defaultChannel.getDefaultChannel(guildId);
let id;
if (defaultChannel != null) {
id = defaultChannel.id;
}
if (id == null) {
let tmp5;
if (guildId === ME) {
privateChannelIds = privateChannelIds.getPrivateChannelIds();
let first;
if (privateChannelIds.length > 0) {
first = privateChannelIds[0];
}
tmp5 = first;
}
id = tmp5;
}
if (channelId === StaticChannelRoute.GUILD_ONBOARDING) {
if (!closure_3.shouldShowOnboarding(guildId)) {
return id;
}
}
if (channelId === StaticChannelRoute.GUILD_HOME) {
if (!obj.canSeeOnboardingHome(guildId)) {
return id;
}
obj = useCanSeeOnboardingHome;
}
if (channelId === StaticChannelRoute.GUILD_SPACE) {
if (obj5.canUseGuildSpace(guild.getGuild(guildId), "getChannelIdForGuildTransition")) {
id = channelId;
}
return id;
} else {
if (channelId === tmp8.GAME_SHOP) {
if (obj2.canSeeGameShop(guildId)) {
return channelId;
}
obj2 = getPrice;
}
channel = channel.getChannel(channelId);
if (null != channel) {
if (!channel.isGuildVocal()) {
let tmp17 = channelId;
if (obj4.isFavoritesGuildId(guildId)) {
tmp17 = channelId;
}
obj4 = getFavoritesAwareGuildName;
}
return tmp17;
}
tmp17 = id;
}
};