Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
63 lines
2.1 KiB
TypeScript
63 lines
2.1 KiB
TypeScript
// Module ID: 17787
|
|
// Function ID: 17788
|
|
// Name: GuildVerificationManager
|
|
// Dependencies: [1074, 13256, 1385, 8695, 13257, 7395, 2]
|
|
|
|
// Module 17787 (GuildVerificationManager)
|
|
import Constants from "Constants" /* 1074 */;
|
|
import FlagUtils from "FlagUtils" /* 1385 */;
|
|
import GuildInviteFlags from "GuildInviteFlags" /* 8695 */;
|
|
import HubUtilsDefault from "HubUtils" /* 13256 */;
|
|
import GuildVerificationUtils from "GuildVerificationUtils" /* 13257 */;
|
|
import AutomaticLifecycleManager from "AutomaticLifecycleManager" /* 7395 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
function handleInviteData(invite) {
|
|
const guild = invite.invite.guild;
|
|
let num = invite.invite.flags;
|
|
if (num == null) {
|
|
num = 0;
|
|
}
|
|
if (null != guild) {
|
|
let hasItem;
|
|
if (guild != null) {
|
|
const features = guild.features;
|
|
if (features != null) {
|
|
hasItem = features.includes(GuildFeatures.HUB);
|
|
}
|
|
}
|
|
if (hasItem) {
|
|
HubUtilsDefault.onOpenHubInvite(invite.invite);
|
|
}
|
|
}
|
|
let new_member = invite.invite.new_member;
|
|
if (new_member) {
|
|
let hasFlagResult = FlagUtils.hasFlag(num, GuildInviteFlags.GuildInviteFlags.IS_GUEST_INVITE);
|
|
if (!hasFlagResult) {
|
|
hasFlagResult = tmp3(1385).hasFlag(num, tmp3(8695).GuildInviteFlags.IS_APPLICATION_BYPASS);
|
|
const tmp3Result = tmp3(1385);
|
|
}
|
|
new_member = !hasFlagResult;
|
|
}
|
|
if (new_member) {
|
|
new_member = null != guild;
|
|
}
|
|
if (new_member) {
|
|
new_member = GuildVerificationUtils.inviteGuildHasPendingMemberDisabledVerification(guild);
|
|
}
|
|
if (new_member) {
|
|
const result = GuildVerificationUtils.openVerificationModalOrTransitionToApplication(guild.id);
|
|
}
|
|
}
|
|
const GuildFeatures = Constants.GuildFeatures;
|
|
const prototype = function GuildVerificationManager() {
|
|
const applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
|
|
applyArgumentsResult.actions = { INVITE_ACCEPT_SUCCESS: handleInviteData };
|
|
return applyArgumentsResult;
|
|
}.prototype;
|
|
class prototype extends tmp2 {
|
|
}
|
|
const prototype1 = new prototype();
|
|
let result = size.fileFinishedImporting("modules/guild_verification/GuildVerificationManager.tsx");
|
|
|
|
export default prototype1;
|