89 lines
3.9 KiB
TypeScript
89 lines
3.9 KiB
TypeScript
/* Metro module 3776; source: modules/guild_role_subscriptions/RolePermissionUtils.tsx; dependencies: [1939, 661, 483, 2] */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as GuildRoleRecordModule from '../../records/GuildRoleRecord.tsx'; /* Metro dependency 1939 */
|
|
|
|
function _fun28580(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#28580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3903:6, offset: 0x00f7de41, size: 166 bytes, params: 8, frame: 19
|
|
const isChannelAccessDeniedBy2 = isChannelAccessDeniedBy;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/guild_role_subscriptions/RolePermissionUtils.tsx');
|
|
exports.hasViewChannelPermission = function(a0) {
|
|
return hasPermission(a0, Permissions.VIEW_CHANNEL);
|
|
};
|
|
exports.isChannelAccessDeniedBy = isChannelAccessDeniedBy2;
|
|
exports.isChannelAccessGrantedBy = isChannelAccessGrantedBy;
|
|
function isChannelAccessDeniedBy(a0, a1) { // fn#28581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3903:142, offset: 0x00f7dee7, size: 144 bytes, params: 3, frame: 19
|
|
var r2;
|
|
var r1;
|
|
var r0;
|
|
var moduleValue;
|
|
var value2;
|
|
var isGuildVocal2;
|
|
var moduleValue2;
|
|
const value = a1 != null;
|
|
if (value) {
|
|
moduleValue = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
|
value2 = moduleValue.has(a1.deny, Permissions.VIEW_CHANNEL);
|
|
if (value2) {
|
|
r1 = !!value2;
|
|
} else {
|
|
isGuildVocal2 = a0.isGuildVocal();
|
|
if (isGuildVocal2) {
|
|
moduleValue2 = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
|
r2 = moduleValue2.has(a1.deny, Permissions.CONNECT);
|
|
} else {
|
|
r2 = isGuildVocal2;
|
|
}
|
|
r1 = r2;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function isChannelAccessGrantedBy(a0, a1) { // fn#28583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3903:543, offset: 0x00f7df95, size: 169 bytes, params: 3, frame: 20
|
|
var r3;
|
|
var r2;
|
|
var r1;
|
|
var r0;
|
|
var isChannelAccessDeniedBy2;
|
|
var moduleValue;
|
|
var value3;
|
|
var isGuildVocal2;
|
|
var moduleValue2;
|
|
const value = a1 != null;
|
|
if (value) {
|
|
isChannelAccessDeniedBy2 = isChannelAccessDeniedBy(a0, a1);
|
|
if (isChannelAccessDeniedBy2) {
|
|
r1 = !isChannelAccessDeniedBy2;
|
|
} else {
|
|
moduleValue = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
|
value3 = moduleValue.has(a1.allow, Permissions.VIEW_CHANNEL);
|
|
if (value3) {
|
|
isGuildVocal2 = a0.isGuildVocal();
|
|
if (isGuildVocal2) {
|
|
moduleValue2 = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
|
r3 = moduleValue2.has(a1.allow, Permissions.CONNECT);
|
|
} else {
|
|
r3 = !isGuildVocal2;
|
|
}
|
|
r2 = r3;
|
|
} else {
|
|
r2 = !!value3;
|
|
}
|
|
r1 = r2;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun28580, 3776, [1939, 661, 483, 2]) /* metro module 3776, dependencies: [1939, 661, 483, 2] */;
|