129 lines
4.5 KiB
TypeScript
129 lines
4.5 KiB
TypeScript
// Module ID: 16952
|
|
// Function ID: 16953
|
|
// Name: isExperimentEnabled
|
|
// Dependencies: [1218, 4679, 5486, 4720, 4677, 2]
|
|
|
|
// Module 16952 (isExperimentEnabled)
|
|
import _guildRoomConnect from "_guildRoomConnect" /* 4677 */;
|
|
import GUILD_ROOMS_EXPERIMENT_ID from "GUILD_ROOMS_EXPERIMENT_ID" /* 4720 */;
|
|
import initializeDefault from "initialize" /* 5486 */;
|
|
import closure_2 from "fetchFingerprint" /* 1218 */;
|
|
import closure_3 from "resolveCreatingNotes" /* 4679 */;
|
|
|
|
require = arg1;
|
|
let c4 = null;
|
|
let c5 = null;
|
|
initializeDefault;
|
|
class GuildRoomManager extends tmp2 {
|
|
constructor() {
|
|
applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
|
|
closure_0 = applyArgumentsResult;
|
|
applyArgumentsResult.actions = {
|
|
VOICE_STATE_UPDATES(arg0) {
|
|
return applyArgumentsResult.handleVoiceStateUpdates(arg0);
|
|
},
|
|
CONNECTION_RESUMED() {
|
|
return applyArgumentsResult.handleConnectionResumed();
|
|
}
|
|
};
|
|
return applyArgumentsResult;
|
|
}
|
|
}
|
|
const prototype = GuildRoomManager.prototype;
|
|
prototype["isExperimentEnabled"] = function isExperimentEnabled(guildId, VOICE_STATE_UPDATE) {
|
|
let obj = GUILD_ROOMS_EXPERIMENT_ID;
|
|
obj = { guildId, location: VOICE_STATE_UPDATE };
|
|
return obj.getGuildRoomsConfig(obj).enabled;
|
|
};
|
|
prototype["handleVoiceStateUpdates"] = function handleVoiceStateUpdates(arg0) {
|
|
const self = this;
|
|
const iter = arg0.voiceStates[Symbol.iterator]();
|
|
while (iter !== undefined) {
|
|
({ userId, guildId, channelId, sessionId, oldChannelId } = nextResult);
|
|
let obj = id;
|
|
let tmp2 = userId;
|
|
if (userId === id.getId()) {
|
|
let tmp12 = sessionId;
|
|
if (sessionId === obj.getSessionId()) {
|
|
let tmp37 = channelId;
|
|
if (channelId !== channelId) {
|
|
let isExperimentEnabledResult = null != channelId;
|
|
if (isExperimentEnabledResult) {
|
|
let tmp13 = guildId;
|
|
isExperimentEnabledResult = null != guildId;
|
|
}
|
|
if (isExperimentEnabledResult) {
|
|
let tmp15 = guildId;
|
|
isExperimentEnabledResult = self.isExperimentEnabled(guildId, "VOICE_STATE_UPDATE");
|
|
}
|
|
if (isExperimentEnabledResult) {
|
|
let tmp16 = require;
|
|
let tmp17 = dependencyMap;
|
|
let obj3 = _guildRoomConnect;
|
|
let tmp18 = guildId;
|
|
let tmp19 = channelId;
|
|
let guildRoomDisconnectResult = obj3.guildRoomDisconnect(guildId, channelId);
|
|
}
|
|
let tmp21 = channelId;
|
|
if (null != channelId) {
|
|
let tmp22 = guildId;
|
|
if (null != guildId) {
|
|
let tmp23 = store;
|
|
let pendingPosition = store.getPendingPosition();
|
|
let pendingSeat = store.getPendingSeat();
|
|
let tmp26 = guildId;
|
|
if (self.isExperimentEnabled(guildId, "VOICE_STATE_UPDATE")) {
|
|
let tmp27 = require;
|
|
let tmp28 = dependencyMap;
|
|
let obj4 = _guildRoomConnect;
|
|
let tmp29 = guildId;
|
|
let tmp30 = channelId;
|
|
let tmp31 = pendingPosition;
|
|
let tmp32 = pendingSeat;
|
|
let tmp33 = obj4;
|
|
let guildRoomConnectResult = obj4.guildRoomConnect(guildId, channelId, pendingPosition, pendingSeat);
|
|
}
|
|
}
|
|
}
|
|
let tmp35 = channelId;
|
|
let tmp36 = guildId;
|
|
}
|
|
}
|
|
} else {
|
|
let tmp3 = oldChannelId;
|
|
let tmp4 = null != oldChannelId;
|
|
if (tmp4) {
|
|
let tmp5 = oldChannelId;
|
|
let tmp6 = channelId;
|
|
tmp4 = oldChannelId !== channelId;
|
|
}
|
|
if (tmp4) {
|
|
let tmp7 = require;
|
|
let tmp8 = dependencyMap;
|
|
let obj2 = _guildRoomConnect;
|
|
let tmp9 = userId;
|
|
let tmp10 = oldChannelId;
|
|
let result = obj2.guildRoomLocalDisconnect(tmp2, oldChannelId);
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
};
|
|
prototype["handleConnectionResumed"] = function handleConnectionResumed() {
|
|
let isExperimentEnabledResult = null != c4;
|
|
if (isExperimentEnabledResult) {
|
|
isExperimentEnabledResult = null != c5;
|
|
}
|
|
if (isExperimentEnabledResult) {
|
|
const self = this;
|
|
isExperimentEnabledResult = this.isExperimentEnabled(c5, "CONNECTION_RESUMED");
|
|
}
|
|
if (isExperimentEnabledResult) {
|
|
const guildRoom = _guildRoomConnect.fetchGuildRoom(c5, c4);
|
|
const obj = _guildRoomConnect;
|
|
}
|
|
};
|
|
const guildRoomManager = new GuildRoomManager();
|
|
let result = require("set").fileFinishedImporting("modules/guild_rooms/GuildRoomManager.tsx");
|
|
|
|
export default guildRoomManager;
|