decord/source/modules/routing/getChannelIdForGuildTransition.tsx

71 lines
2.1 KiB
TypeScript
Raw Normal View History

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