57 lines
2.8 KiB
TypeScript
57 lines
2.8 KiB
TypeScript
/* Metro module 5107; source: modules/channel/isRoleRequired.tsx; dependencies: [1383, 482, 3789, 483, 2] */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
|
|
import * as ChannelRecordModule from '../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
|
|
|
|
function _fun44628(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5285:6, offset: 0x0117593f, size: 140 bytes, params: 8, frame: 18
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/channel/isRoleRequired.tsx');
|
|
exports.default = isRoleRequired;
|
|
function isRoleRequired(a0) { // fn#44629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5285:239, offset: 0x011759cb, size: 197 bytes, params: 2, frame: 15
|
|
var r0;
|
|
var moduleValue;
|
|
var property;
|
|
var value2;
|
|
var moduleValue2;
|
|
if (a0 != null) {
|
|
var type = a0.type;
|
|
if (a0.guild_id == null) {
|
|
return false;
|
|
}
|
|
var value;
|
|
if (GUILD_NON_CATEGORY_CHANNEL_TYPES.has(type)) {
|
|
if (a0.isGuildVocal()) {
|
|
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
|
|
if (moduleValue.canEveryoneRole(Permissions.CONNECT, a0)) {
|
|
property = a0.permissionOverwrites[a0.guild_id];
|
|
value2 = property != null;
|
|
if (value2) {
|
|
moduleValue2 = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
|
r0 = moduleValue2.has(property.deny, Permissions.VIEW_CHANNEL);
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
return true;
|
|
}
|
|
property = a0.permissionOverwrites[a0.guild_id];
|
|
value2 = property != null;
|
|
if (value2) {
|
|
moduleValue2 = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
|
r0 = moduleValue2.has(property.deny, Permissions.VIEW_CHANNEL);
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun44628, 5107, [1383, 482, 3789, 483,
|
|
2]) /* metro module 5107, dependencies: [1383, 482, 3789, 483, 2] */;
|