84 lines
3.7 KiB
TypeScript
84 lines
3.7 KiB
TypeScript
/* Metro module 5045; source: modules/channel/getConnectionsRoles.tsx; dependencies: [1938, 1867, 661, 483, 2] */
|
|
function _fun43709(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5223:6, offset: 0x0115a1be, size: 263 bytes, params: 8, frame: 20
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
|
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
|
let value = require(661) /* metro dependency 661: Constants */;
|
|
const ChannelTypes = value.ChannelTypes;
|
|
const Permissions = value.Permissions;
|
|
const GUILD_TEXT = ChannelTypes.GUILD_TEXT;
|
|
items = [GUILD_TEXT];
|
|
const GUILD_VOICE = ChannelTypes.GUILD_VOICE;
|
|
items[1] = GUILD_VOICE;
|
|
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
|
|
items[2] = GUILD_ANNOUNCEMENT;
|
|
const GUILD_FORUM = ChannelTypes.GUILD_FORUM;
|
|
items[3] = GUILD_FORUM;
|
|
const PUBLIC_THREAD = ChannelTypes.PUBLIC_THREAD;
|
|
items[4] = PUBLIC_THREAD;
|
|
const PRIVATE_THREAD = ChannelTypes.PRIVATE_THREAD;
|
|
items[5] = PRIVATE_THREAD;
|
|
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
|
const combine = value.combine;
|
|
const VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
|
|
const SEND_MESSAGES = Permissions.SEND_MESSAGES;
|
|
const env0_5 = Reflect.apply(combine, value, [VIEW_CHANNEL, SEND_MESSAGES]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/getConnectionsRoles.tsx');
|
|
exports.default = getConnectionsRoles;
|
|
}
|
|
|
|
function getConnectionsRoles(a0) { // fn#43710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5223:391, offset: 0x0115a2c5, size: 150 bytes, params: 2, frame: 15
|
|
var r0;
|
|
var Object;
|
|
if (a0 != null) {
|
|
var value;
|
|
var binding = env0_4;
|
|
if (binding.includes(a0.type)) {
|
|
value = GuildStore.getGuild(a0.guild_id);
|
|
if (value == null) {
|
|
r0 = [];
|
|
} else {
|
|
Object = global.Object;
|
|
value = Object.values(a0.permissionOverwrites);
|
|
value = value.filter(_fun43711);
|
|
value = value.map(_fun43712);
|
|
value = value.filter(function(a0) {
|
|
return a0 != null;
|
|
});
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
}
|
|
return [];
|
|
}
|
|
|
|
function _fun43711(a0) { // fn#43711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5223:557, offset: 0x0115a35b, size: 144 bytes, params: 2, frame: 16
|
|
var r0;
|
|
var moduleValue;
|
|
let value = a0.type === 0;
|
|
if (value) {
|
|
value = environment.__proto__;
|
|
value = GuildRoleStore.getRole(env0_0.id, a0.id);
|
|
value = (value == null || value.tags == null ? undefined : value.tags.guild_connections) === null;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
if (r0) {
|
|
value = environment.__proto__;
|
|
moduleValue = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
|
value = !moduleValue.hasAny(a0.deny, env1_5);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun43712({id}) { // fn#43712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5223:706, offset: 0x0115a3eb, size: 41 bytes, params: 2, frame: 13
|
|
const getRole = GuildRoleStore.getRole;
|
|
const id = env0_0.id;
|
|
return Reflect.apply(getRole, GuildRoleStore, [id, id]);
|
|
}
|
|
|