62 lines
3.0 KiB
TypeScript
62 lines
3.0 KiB
TypeScript
/* Metro module 9595; source: modules/forwarding/isStaffToNonStaffForward.tsx; dependencies: [1379, 1867, 1878, 661, 2] */
|
|
function _fun75195(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9781:6, offset: 0x01da5a70, size: 171 bytes, params: 8, frame: 19
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
const env0_3 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forwarding/isStaffToNonStaffForward.tsx');
|
|
exports.default = isStaffToNonStaffForward;
|
|
}
|
|
|
|
function isStaffChannel(a0) { // fn#75196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9781:150, offset: 0x01da5b1b, size: 104 bytes, params: 2, frame: 13
|
|
if (a0.isPrivate()) {
|
|
return a0.recipients.every(_fun75197);
|
|
}
|
|
const guild = GuildStore.getGuild(a0.guild_id);
|
|
return guild != null && guild.features.has(GuildFeatures.INTERNAL_EMPLOYEE_ONLY);
|
|
}
|
|
|
|
function isStaffToNonStaffForward(a0, a1) { // fn#75198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9781:454, offset: 0x01da5bad, size: 116 bytes, params: 3, frame: 14
|
|
var r0;
|
|
var value3;
|
|
var value4;
|
|
var isStaffChannel2;
|
|
const currentUser = UserStore.getCurrentUser();
|
|
if (currentUser != null) {
|
|
if (currentUser.isStaff()) {
|
|
value3 = ChannelStore.getChannel(a0.channel_id);
|
|
value4 = value3 != null;
|
|
if (value4) {
|
|
isStaffChannel2 = isStaffChannel(value3);
|
|
r0 = isStaffChannel2 ? a1.some(_fun75199) : !!isStaffChannel2;
|
|
} else {
|
|
r0 = value4;
|
|
}
|
|
return r0;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function _fun75197(a0) { // fn#75197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9781:309, offset: 0x01da5b83, size: 42 bytes, params: 2, frame: 11
|
|
var r0;
|
|
let value = environment.__proto__;
|
|
const value2 = UserStore.getUser(a0) != null;
|
|
if (value2) {
|
|
value = value.isStaff();
|
|
r0 = value;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun75199(a0) { // fn#75199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9781:633, offset: 0x01da5c21, size: 64 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__;
|
|
const channel = ChannelStore.getChannel(a0);
|
|
return channel != null && (!channel.isPrivate() && !isStaffChannel(channel));
|
|
}
|
|
|