/* Metro module 9595; source: modules/forwarding/isStaffToNonStaffForward.tsx; dependencies: [1379, 1867, 1878, 661, 2] */ import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */ import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */ 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}); (FileImportTrackerModule).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 _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 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 channelStoreBinding; var value3; var value4; var isStaffChannel2; const currentUser = UserStore.getCurrentUser(); if (currentUser != null) { if (currentUser.isStaff()) { channelStoreBinding = ChannelStore; value3 = channelStoreBinding.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 _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)); } } } global.__d(_fun75195, 9595, [1379, 1867, 1878, 661, 2]) /* metro module 9595, dependencies: [1379, 1867, 1878, 661, 2] */;