decord/source/modules/game_console/getXboxURIForChannel.tsx

55 lines
2 KiB
TypeScript
Raw Normal View History

// Module ID: 9604
// Function ID: 9605
2026-07-20 16:05:17 +00:00
// Name: getXboxURIForChannel
// Dependencies: [1980, 1909, 4286, 1372, 9376, 1074, 4791, 1115, 1271, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 9604 (getXboxURIForChannel)
import useChannelName from "useChannelName" /* 4791 */;
import GuildStore from "GuildStore" /* 1980 */;
import MediaEngineStore from "MediaEngineStore" /* 1909 */;
import RelationshipStore from "RelationshipStore" /* 4286 */;
import UserStore from "UserStore" /* 1372 */;
2026-07-20 16:05:17 +00:00
require = fn;
const GameConsoleConstants = fn(9376);
({ XBOX_HANDOFF_SEARCH_PARAMS: metroRequire, XBOX_URL_BASE: closure_7 } = GameConsoleConstants);
const Constants = fn(1074);
({ Endpoints: closure_8, ZERO_STRING_GUILD_ID: closure_9 } = Constants);
const size = fn(2);
const result = size.fileFinishedImporting("modules/game_console/getXboxURIForChannel.tsx");
2026-07-20 16:05:17 +00:00
export default function getXboxURIForChannel(channelId, arg1) {
2026-07-20 16:05:17 +00:00
({ nonce, forQRCode } = arg1);
2026-07-29 08:29:29 +00:00
const guildId = channelId.getGuildId();
const guild = GuildStore.getGuild(guildId);
2026-07-29 08:29:29 +00:00
let tmp4 = guildId;
if (guildId == null) {
tmp4 = React7;
2026-07-20 16:05:17 +00:00
}
const obj = { guildId: tmp4, channelId: channelId.id, channelName: useChannelName.computeChannelName(channelId, UserStore, RelationshipStore), guildName: null, muted: null, deafened: null, nonce: null };
2026-07-20 16:05:17 +00:00
let name;
2026-07-29 08:29:29 +00:00
if (guild != null) {
2026-07-20 16:05:17 +00:00
name = guild.name;
}
2026-07-29 08:29:29 +00:00
if (name == null) {
const intl = tmp5(1115).intl;
name = intl.string(tmp5(1115).t.LJpTRF);
2026-07-20 16:05:17 +00:00
}
obj.guildName = name;
obj.muted = MediaEngineStore.isSelfMute();
obj.deafened = MediaEngineStore.isSelfDeaf();
obj.nonce = nonce;
const str = timestampProducer(obj);
2026-07-20 16:05:17 +00:00
if (forQRCode) {
const aPIBaseURL = tmp5(1271).getAPIBaseURL();
2026-07-20 16:05:17 +00:00
const _HermesInternal2 = HermesInternal;
let combined = "" + aPIBaseURL + constants.XBOX_HANDOFF + "?" + str.toString();
const tmp5Result = tmp5(1271);
2026-07-20 16:05:17 +00:00
} else {
const _HermesInternal = HermesInternal;
combined = "" + React5 + "?" + str.toString();
2026-07-20 16:05:17 +00:00
}
return combined;
};