decord/source/modules/rpc/helpers/validateOpenInviteDialog.tsx

57 lines
2 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 13625
// Function ID: 13626
2026-07-20 16:05:17 +00:00
// Name: validateOpenInviteDialog
2026-08-05 07:35:12 +00:00
// Dependencies: [10478, 1862, 3883, 676, 13614, 10515, 8853, 2]
2026-07-20 16:05:17 +00:00
// Exports: validateOpenInviteDialog
2026-08-05 07:35:12 +00:00
// Module 13625 (validateOpenInviteDialog)
2026-07-29 08:29:29 +00:00
import map from "map";
import createGuildRecordFromRust from "createGuildRecordFromRust";
import getUncachedChannelPermissions from "getUncachedChannelPermissions";
2026-07-23 10:11:24 +00:00
import { RPCErrors } from "ME";
const require = arg1;
2026-07-29 08:29:29 +00:00
const result = require("getUncachedChannelPermissions").fileFinishedImporting("modules/rpc/helpers/validateOpenInviteDialog.tsx");
2026-07-20 16:05:17 +00:00
export const validateOpenInviteDialog = function validateOpenInviteDialog() {
2026-07-23 10:11:24 +00:00
connectedFrame = connectedFrame.getConnectedFrame();
2026-07-20 16:05:17 +00:00
if (null != connectedFrame) {
2026-08-05 07:35:12 +00:00
let obj = { frame: null, channel: "Array", guild: "marginTop" };
2026-07-29 08:29:29 +00:00
obj[0] = connectedFrame;
2026-07-20 16:05:17 +00:00
return obj;
} else {
2026-08-05 07:35:12 +00:00
const obj6 = importDefault(13614)();
2026-07-20 16:05:17 +00:00
if (null == obj6) {
2026-07-29 08:29:29 +00:00
obj = { errorCode: null };
obj[0] = RPCErrors.INVALID_CHANNEL;
2026-08-05 07:35:12 +00:00
const tmp22 = new tmp24(10515)(obj, "Invalid channel");
2026-07-29 08:29:29 +00:00
throw tmp22;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
guild = guild.getGuild(obj6.getGuildId());
2026-07-20 16:05:17 +00:00
if (null == guild) {
2026-07-29 08:29:29 +00:00
const obj1 = { errorCode: null };
obj1[0] = RPCErrors.INVALID_CHANNEL;
2026-08-05 07:35:12 +00:00
let tmp24Result = tmp24(10515);
2026-07-20 16:05:17 +00:00
const _HermesInternal2 = HermesInternal;
2026-07-29 08:29:29 +00:00
tmp24Result = new tmp24Result(obj1, "Invalid guild " + obj6.getGuildId());
throw tmp24Result;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
if (obj7.canViewInviteModal(getUncachedChannelPermissions, guild, obj6)) {
2026-08-05 07:35:12 +00:00
const obj2 = { frame: "r", channel: "Path", guild: "TRANSPARENT" };
2026-07-29 08:29:29 +00:00
obj2[1] = obj6;
obj2[2] = guild;
2026-07-20 16:05:17 +00:00
return obj2;
} else {
2026-07-29 08:29:29 +00:00
obj = { errorCode: null };
obj[0] = RPCErrors.INVALID_PERMISSIONS;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
2026-08-05 07:35:12 +00:00
let tmp2 = tmp24(10515);
2026-07-29 08:29:29 +00:00
tmp2 = new tmp2(obj, "No invite permissions for " + obj6.id);
throw tmp2;
2026-07-20 16:05:17 +00:00
}
2026-08-05 07:35:12 +00:00
obj7 = require(8853) /* canViewInviteModal */;
2026-07-20 16:05:17 +00:00
}
}
}
};