decord/source/modules/game_console/getXboxURIForChannel.tsx
github-actions 777dc50a28 chore: update source for alpha 346.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
2026-09-10 19:12:31 +00:00

54 lines
2 KiB
TypeScript

// Module ID: 9531
// Function ID: 9532
// Name: getXboxURIForChannel
// Dependencies: [1979, 1908, 4253, 1371, 9302, 1074, 4758, 1114, 1272, 2]
// Exports: default
// Module 9531 (getXboxURIForChannel)
import useChannelName from "useChannelName" /* 4758 */;
import GuildStore from "GuildStore" /* 1979 */;
import MediaEngineStore from "MediaEngineStore" /* 1908 */;
import RelationshipStore from "RelationshipStore" /* 4253 */;
import UserStore from "UserStore" /* 1371 */;
require = fn;
const GameConsoleConstants = fn(9302);
({ 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");
export default function getXboxURIForChannel(channelId, arg1) {
({ nonce, forQRCode } = arg1);
const guildId = channelId.getGuildId();
const guild = GuildStore.getGuild(guildId);
let tmp4 = guildId;
if (guildId == null) {
tmp4 = React7;
}
const obj = { guildId: tmp4, channelId: channelId.id, channelName: useChannelName.computeChannelName(channelId, UserStore, RelationshipStore), guildName: null, muted: null, deafened: null, nonce: null };
let name;
if (guild != null) {
name = guild.name;
}
if (name == null) {
const intl = tmp5(1114).intl;
name = intl.string(tmp5(1114).t.LJpTRF);
}
obj.guildName = name;
obj.muted = MediaEngineStore.isSelfMute();
obj.deafened = MediaEngineStore.isSelfDeaf();
obj.nonce = nonce;
const str = timestampProducer(obj);
if (forQRCode) {
const aPIBaseURL = tmp5(1272).getAPIBaseURL();
const _HermesInternal2 = HermesInternal;
let combined = "" + aPIBaseURL + constants.XBOX_HANDOFF + "?" + str.toString();
const tmp5Result = tmp5(1272);
} else {
const _HermesInternal = HermesInternal;
combined = "" + React5 + "?" + str.toString();
}
return combined;
};