94 lines
4.5 KiB
TypeScript
94 lines
4.5 KiB
TypeScript
/* Metro module 5045; source: modules/channel/getConnectionsRoles.tsx; dependencies: [1938, 1867, 661, 483, 2] */
|
|
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import GuildRoleStore from '../../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
|
|
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});
|
|
let value = ConstantsModule;
|
|
const ChannelTypes = value.ChannelTypes;
|
|
const Permissions = value.Permissions;
|
|
const GUILD_TEXT = ChannelTypes.GUILD_TEXT;
|
|
items2 = [GUILD_TEXT];
|
|
const GUILD_VOICE = ChannelTypes.GUILD_VOICE;
|
|
items2[1] = GUILD_VOICE;
|
|
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
|
|
items2[2] = GUILD_ANNOUNCEMENT;
|
|
const GUILD_FORUM = ChannelTypes.GUILD_FORUM;
|
|
items2[3] = GUILD_FORUM;
|
|
const PUBLIC_THREAD = ChannelTypes.PUBLIC_THREAD;
|
|
items2[4] = PUBLIC_THREAD;
|
|
const PRIVATE_THREAD = ChannelTypes.PRIVATE_THREAD;
|
|
items2[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]);
|
|
(FileImportTrackerModule).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 guildStoreBinding;
|
|
var Object;
|
|
if (a0 != null) {
|
|
var value;
|
|
var binding = env0_4;
|
|
if (binding.includes(a0.type)) {
|
|
guildStoreBinding = GuildStore;
|
|
value = guildStoreBinding.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 guildRoleStoreBinding;
|
|
var moduleValue;
|
|
let value = a0.type === 0;
|
|
if (value) {
|
|
value = environment.__proto__;
|
|
guildRoleStoreBinding = GuildRoleStore;
|
|
value = guildRoleStoreBinding.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 guildRoleStoreBinding = GuildRoleStore;
|
|
const getRole = guildRoleStoreBinding.getRole;
|
|
const id = env0_0.id;
|
|
return Reflect.apply(getRole, guildRoleStoreBinding, [id, id]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun43709, 5045, [1938, 1867, 661, 483,
|
|
2]) /* metro module 5045, dependencies: [1938, 1867, 661, 483, 2] */;
|