53 lines
1.9 KiB
TypeScript
53 lines
1.9 KiB
TypeScript
// Module ID: 9466
|
|
// Function ID: 9467
|
|
// Name: getXboxURIForChannel
|
|
// Dependencies: [1979, 1908, 4209, 1371, 9238, 1074, 4713, 1114, 1272, 2]
|
|
// Exports: default
|
|
|
|
// Module 9466 (getXboxURIForChannel)
|
|
import computeChannelName from "computeChannelName" /* 4713 */;
|
|
import closure_2 from "createGuildRecordFromRust" /* 1979 */;
|
|
import closure_3 from "_detectH265HardwareDecode" /* 1908 */;
|
|
import closure_4 from "markAllUserIdListsStale" /* 4209 */;
|
|
import closure_5 from "mergeGuildAvatar" /* 1371 */;
|
|
import XBOX_URL_BASE from "XBOX_URL_BASE" /* 9238 */;
|
|
import ME from "ME" /* 1074 */;
|
|
|
|
require = arg1;
|
|
({ XBOX_HANDOFF_SEARCH_PARAMS: closure_6, XBOX_URL_BASE: error } = XBOX_URL_BASE);
|
|
({ Endpoints: closure_8, ZERO_STRING_GUILD_ID: c9 } = ME);
|
|
const result = require("set").fileFinishedImporting("modules/game_console/getXboxURIForChannel.tsx");
|
|
|
|
export default function getXboxURIForChannel(channelId) {
|
|
({ nonce, forQRCode } = arg1);
|
|
const guildId = channelId.getGuildId();
|
|
guild = guild.getGuild(guildId);
|
|
let tmp4 = guildId;
|
|
if (guildId == null) {
|
|
tmp4 = closure_9;
|
|
}
|
|
const obj = { guildId: tmp4, channelId: channelId.id, channelName: computeChannelName.computeChannelName(channelId, closure_5, closure_4), 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[3] = name;
|
|
obj[4] = closure_3.isSelfMute();
|
|
obj[5] = closure_3.isSelfDeaf();
|
|
obj[6] = nonce;
|
|
const str = closure_6(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 = "" + closure_7 + "?" + str.toString();
|
|
}
|
|
return combined;
|
|
};
|