decord/alpha/source/modules/routing/getChannelIdForGuildTransition.tsx

95 lines
3.1 KiB
TypeScript
Raw Normal View History

// Module ID: 7548
// Function ID: 7549
2026-07-20 16:05:17 +00:00
// Name: getChannelIdForGuildTransition
// Dependencies: [2045, 7427, 2042, 4460, 2064, 2096, 7549, 1074, 2049, 7553, 7555, 7557, 5360, 2067, 2]
2026-07-20 16:05:17 +00:00
// Exports: getChannelIdForGuildTransition
// Module 7548 (getChannelIdForGuildTransition)
import FavoritesUtils from "FavoritesUtils" /* 2067 */;
import VibegrationsUtils from "VibegrationsUtils" /* 5360 */;
import OnboardingHomeUtils from "OnboardingHomeUtils" /* 7553 */;
import SlayerStorefrontUtils from "SlayerStorefrontUtils" /* 7557 */;
import FavoriteStore from "FavoriteStore" /* 2045 */;
import GuildOnboardingStore from "GuildOnboardingStore" /* 7427 */;
import ChannelStore from "ChannelStore" /* 2042 */;
import GuildChannelStore from "GuildChannelStore" /* 4460 */;
import GuildStore from "GuildStore" /* 2064 */;
import SelectedChannelStore from "SelectedChannelStore" /* 2096 */;
import PrivateChannelSortStore from "PrivateChannelSortStore" /* 7549 */;
2026-07-23 10:11:24 +00:00
require = fn;
const ME = fn(1074).ME;
const StaticChannelRoute = fn(2049).StaticChannelRoute;
const size = fn(2);
const result = size.fileFinishedImporting("modules/routing/getChannelIdForGuildTransition.tsx");
2026-07-20 16:05:17 +00:00
2026-08-06 08:05:19 +00:00
export const getChannelIdForGuildTransition = function getChannelIdForGuildTransition(guildId) {
const channelId = SelectedChannelStore.getChannelId(guildId);
const defaultChannel = GuildChannelStore.getDefaultChannel(guildId);
2026-08-06 08:05:19 +00:00
let id;
2026-07-29 08:29:29 +00:00
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-08-06 08:05:19 +00:00
if (guildId === ME) {
const privateChannelIds = PrivateChannelSortStore.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) {
if (!GuildOnboardingStore.shouldShowOnboarding(guildId)) {
2026-07-20 16:05:17 +00:00
return id;
}
}
if (channelId === StaticChannelRoute.GUILD_HOME) {
2026-08-06 08:05:19 +00:00
if (!obj.canSeeOnboardingHome(guildId)) {
2026-07-20 16:05:17 +00:00
return id;
}
obj = OnboardingHomeUtils;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if (channelId === StaticChannelRoute.GUILD_SPACE) {
if (obj6.canUseGuildSpace(GuildStore.getGuild(guildId), "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) {
2026-08-06 08:05:19 +00:00
if (obj2.canSeeGameShop(guildId)) {
2026-07-23 10:11:24 +00:00
return channelId;
}
obj2 = SlayerStorefrontUtils;
2026-07-23 10:11:24 +00:00
}
if (channelId === tmp8.VIBEGRATIONS) {
const guild = GuildStore.getGuild(guildId);
let tmp21 = id;
if (null != guild) {
tmp21 = id;
if (obj5.canAccessVibegrations(guild, "getChannelIdForGuildTransition")) {
tmp21 = channelId;
2026-08-06 08:05:19 +00:00
}
obj5 = VibegrationsUtils;
2026-08-06 08:05:19 +00:00
}
return tmp21;
} else {
const channel = ChannelStore.getChannel(channelId);
if (null != channel) {
if (!channel.isGuildVocal()) {
let tmp17 = channelId;
if (obj4.isFavoritesGuildId(guildId)) {
tmp17 = channelId;
}
obj4 = FavoritesUtils;
}
return tmp17;
}
tmp17 = id;
2026-07-23 10:11:24 +00:00
}
2026-07-20 16:05:17 +00:00
}
};