2026-10-12 16:32:48 +00:00
|
|
|
// Module ID: 8533
|
|
|
|
|
// Function ID: 8534
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: canViewInviteModal
|
2026-10-07 22:43:51 +00:00
|
|
|
// Dependencies: [1085, 2]
|
2026-09-18 19:45:33 +00:00
|
|
|
// Exports: canViewInviteModal
|
|
|
|
|
|
2026-10-12 16:32:48 +00:00
|
|
|
// Module 8533 (canViewInviteModal)
|
2026-10-07 22:43:51 +00:00
|
|
|
import Constants from "Constants" /* 1085 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
|
|
|
|
|
|
|
|
|
const Permissions = Constants.Permissions;
|
|
|
|
|
const result = size.fileFinishedImporting("modules/instant_invite/canViewInviteModal.tsx");
|
|
|
|
|
|
2026-10-12 16:32:48 +00:00
|
|
|
export const canViewInviteModal = function canViewInviteModal(PermissionStore, guild, channel1, stageInstanceByChannel) {
|
|
|
|
|
let tmp = channel1;
|
|
|
|
|
if (channel1 == null) {
|
2026-09-18 19:45:33 +00:00
|
|
|
tmp = guild;
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
let canResult = null != tmp && PermissionStore.can(Permissions.CREATE_INSTANT_INVITE, tmp);
|
2026-09-18 19:45:33 +00:00
|
|
|
if (!canResult) {
|
|
|
|
|
canResult = null != guild && null != guild.vanityURLCode;
|
|
|
|
|
}
|
|
|
|
|
if (!canResult) {
|
|
|
|
|
let invite_code;
|
|
|
|
|
if (stageInstanceByChannel != null) {
|
|
|
|
|
invite_code = stageInstanceByChannel.invite_code;
|
|
|
|
|
}
|
|
|
|
|
canResult = null != invite_code;
|
|
|
|
|
}
|
|
|
|
|
return canResult;
|
|
|
|
|
};
|