546 lines
22 KiB
TypeScript
546 lines
22 KiB
TypeScript
/* Metro module 1936; source: modules/channel/GatedChannelStore.tsx; dependencies: [6, 7, 15, 17, 18, 1937, 1383, 1939, 1379, 1945, 1938, 1867, 1878, 661, 3775, 3776, 3777, 566, 694, 2] */
|
|
function _fun21461(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:6, offset: 0x00ef11cf, size: 625 bytes, params: 8, frame: 24
|
|
const env0_0 = require;
|
|
const _arrayLikeToArray_21467 = function(a0, a1) {
|
|
var r0;
|
|
var r1;
|
|
var r2;
|
|
var value3;
|
|
var length;
|
|
var value5;
|
|
var value = undefined;
|
|
var value2 = value == null;
|
|
reducibleJoin2: while (true) {
|
|
if (value2) {
|
|
r0 = value2;
|
|
break reducibleJoin2;
|
|
}
|
|
value3 = value > a0.length;
|
|
r0 = value3;
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (r0) {
|
|
length = a0.length;
|
|
r1 = length;
|
|
break reducibleJoin4;
|
|
}
|
|
r1 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
value = (0, global.Array)(r1);
|
|
var value4 = 0;
|
|
if (value4 < r1) {
|
|
r2 = value4;
|
|
reducibleLoop5: while (true) {
|
|
value[r2] = a0[r2];
|
|
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value5 < r1) {
|
|
r2 = value5;
|
|
continue reducibleLoop5;
|
|
}
|
|
break reducibleLoop5;
|
|
}
|
|
}
|
|
return value;
|
|
};
|
|
const closure = CONNECTION_OPEN_21471;
|
|
const closure2 = GUILD_CREATE_21472;
|
|
const closure3 = GUILD_ROLE_CREATE_21473;
|
|
const closure4 = CHANNEL_CREATE_21474;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
|
const impersonateStore = importDefault(1937) /* metro dependency 1937: ImpersonateStore */;
|
|
const env0_8 = (require(1383) /* metro dependency 1383: ChannelRecord */).THREAD_CHANNEL_TYPES;
|
|
const env0_9 = (require(1939) /* metro dependency 1939: GuildRoleRecord */).hasPermission;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
|
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
|
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
|
const env0_15 = constantsModule.Permissions;
|
|
const env0_16 = constantsModule.GuildFeatures;
|
|
const env0_17 = {};
|
|
const Set = global.Set;
|
|
let set = new Set();
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
_fun21475(Store).displayName = 'GatedChannelStore';
|
|
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: closure,
|
|
OVERLAY_INITIALIZE: closure, CACHE_LOADED_LAZY: closure, GUILD_CREATE: closure2, GUILD_UPDATE: closure2,
|
|
GUILD_DELETE: closure2, GUILD_ROLE_CREATE: closure3, GUILD_ROLE_UPDATE: closure3, GUILD_ROLE_DELETE: closure3,
|
|
IMPERSONATE_UPDATE: closure3, IMPERSONATE_STOP: closure3, CHANNEL_CREATE: closure4, CHANNEL_DELETE: closure4,
|
|
CHANNEL_UPDATES: function({channels}) {
|
|
var r2;
|
|
var r3;
|
|
var r9;
|
|
var r0;
|
|
var computeForChannelBinding;
|
|
var guild_id;
|
|
var value5;
|
|
var value6;
|
|
var value2 = _createForOfIteratorHelperLoose_21465(channels);
|
|
var value3 = value2();
|
|
var value4 = false;
|
|
if (value3.done) {
|
|
r0 = value4;
|
|
} else {
|
|
r2 = value4;
|
|
r3 = value3;
|
|
while (true) {
|
|
channels = r3.value;
|
|
if (channels.guild_id == null) {
|
|
r9 = r2;
|
|
} else {
|
|
computeForChannelBinding = computeForChannel;
|
|
guild_id = channels.guild_id;
|
|
if (!computeForChannelBinding(guild_id, channels.id)) {
|
|
continue;
|
|
}
|
|
value5 = true;
|
|
r9 = value5;
|
|
}
|
|
value6 = value2();
|
|
if (value6.done) {
|
|
r0 = r9;
|
|
break;
|
|
}
|
|
r2 = r9;
|
|
r3 = value6;
|
|
continue;
|
|
}
|
|
}
|
|
return r0;
|
|
}, GUILD_ROLE_SUBSCRIPTIONS_FETCH_RESTRICTIONS_SUCCESS: GUILD_ROLE_SUBSCRIPTIONS_FETCH_RESTRICTIONS_SUCCESS,
|
|
GUILD_ROLE_SUBSCRIPTIONS_FETCH_RESTRICTIONS_FAILURE: GUILD_ROLE_SUBSCRIPTIONS_FETCH_RESTRICTIONS_FAILURE});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/GatedChannelStore.tsx');
|
|
exports.default = set;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_21462() { // fn#21462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:316, offset: 0x00ef1440, size: 94 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_21462_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _createForOfIteratorHelperLoose_21465(a0, a1) { // fn#21465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:509, offset: 0x00ef149e, size: 370 bytes, params: 3, frame: 20
|
|
var r6;
|
|
var r9;
|
|
var r5;
|
|
var value3;
|
|
var regexp;
|
|
const env0_0 = a0;
|
|
const Symbol = global.Symbol;
|
|
let value = typeof Symbol !== 'undefined';
|
|
let r1 = value && a0[global.Symbol.iterator];
|
|
r1 = !r1 ? a0['@@iterator'] : r1;
|
|
if (r1) {
|
|
value = r1.call(a0);
|
|
return value.next.bind(value);
|
|
}
|
|
const Array = global.Array;
|
|
if (Array.isArray(a0)) {
|
|
if (r1) {
|
|
}
|
|
return _fun21466;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_21467(a0, value);
|
|
r5 = value;
|
|
} else {
|
|
value3 = ({}).toString.call(a0).slice(8, -1);
|
|
r6 = value3 === 'Object' && a0.constructor;
|
|
r9 = r6 ? a0.constructor.name : value3;
|
|
if (r9 === 'Map') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Set') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Arguments') {
|
|
value = _arrayLikeToArray_21467(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_21467(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun21466;
|
|
}
|
|
const TypeError = global.TypeError;
|
|
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
|
}
|
|
|
|
function isSubscriptionGated({guildId, role, isPreviewingRoles}) { // fn#21468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:1438, offset: 0x00ef1610, size: 228 bytes, params: 2, frame: 20
|
|
var r2;
|
|
var r3;
|
|
var r1;
|
|
var r0;
|
|
var moduleValue2;
|
|
var isSubscriptionRoleAvailableForPurchase;
|
|
var isSubscriptionRoleAvailableForPurchase2;
|
|
var value6;
|
|
var currentUser;
|
|
const isSubscriptionRole2 = (require(3775) /* metro dependency 3775: PremiumRoleUtils */).isSubscriptionRole(role);
|
|
if (isSubscriptionRole2) {
|
|
if (isPreviewingRoles) {
|
|
r1 = !!isPreviewingRoles;
|
|
} else {
|
|
moduleValue2 = require(3775) /* metro dependency 3775: PremiumRoleUtils */;
|
|
isSubscriptionRoleAvailableForPurchase = moduleValue2.isSubscriptionRoleAvailableForPurchase;
|
|
r2 = role ?? undefined;
|
|
isSubscriptionRoleAvailableForPurchase2 = Reflect.apply(isSubscriptionRoleAvailableForPurchase,
|
|
moduleValue2,
|
|
[r2]);
|
|
if (isSubscriptionRoleAvailableForPurchase2) {
|
|
r2 = !!isSubscriptionRoleAvailableForPurchase2;
|
|
} else {
|
|
value6 = false;
|
|
if (role == null) {
|
|
r3 = value6;
|
|
} else {
|
|
currentUser = UserStore.getCurrentUser();
|
|
r3 = currentUser == null ? value6 : GuildMemberStore.getMember(guildId,
|
|
currentUser.id) != null && GuildMemberStore.getMember(guildId,
|
|
currentUser.id).roles.includes(role.id);
|
|
}
|
|
r2 = !!r3;
|
|
}
|
|
r1 = r2;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = !!isSubscriptionRole2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function isChannelSubscriptionGatedInGuild(a0, a1) { // fn#21469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:1798, offset: 0x00ef16f4, size: 482 bytes, params: 3, frame: 22
|
|
var r1;
|
|
var property;
|
|
var getRole;
|
|
var value4;
|
|
var isSubscriptionGatedBinding;
|
|
var object2;
|
|
var moduleValue;
|
|
var isChannelAccessGrantedBy;
|
|
var value5;
|
|
var _createForOfIteratorHelperLoose_21465Binding;
|
|
var getSortedRoles;
|
|
var value7;
|
|
var value8;
|
|
var done;
|
|
var value9;
|
|
var moduleValue3;
|
|
var hasViewChannelPermission;
|
|
var value10;
|
|
let features = a1.features;
|
|
const has = features.has;
|
|
const CREATOR_MONETIZABLE = GuildFeatures.CREATOR_MONETIZABLE;
|
|
if (!Reflect.apply(has, features, [CREATOR_MONETIZABLE])) {
|
|
features = a1.features;
|
|
reducibleJoin3: while (true) {
|
|
if (!features.has(GuildFeatures.CREATOR_MONETIZABLE_PROVISIONAL)) {
|
|
return false;
|
|
}
|
|
break reducibleJoin3;
|
|
}
|
|
}
|
|
const isViewingServerShop = ImpersonateStore.isViewingServerShop;
|
|
let id = a1.id;
|
|
const isViewingServerShop2 = Reflect.apply(isViewingServerShop, ImpersonateStore, [id]);
|
|
const Object = global.Object;
|
|
const keys = Object.keys;
|
|
let permissionOverwrites = a0.permissionOverwrites;
|
|
const value2 = Reflect.apply(keys, Object, [permissionOverwrites]);
|
|
let length = value2.length;
|
|
const value3 = 0;
|
|
if (value3 < length) {
|
|
r1 = value3;
|
|
reducibleLoop4: while (true) {
|
|
property = value2[r1];
|
|
getRole = GuildRoleStore.getRole;
|
|
id = a1.id;
|
|
value4 = Reflect.apply(getRole, GuildRoleStore, [id, property]);
|
|
isSubscriptionGatedBinding = isSubscriptionGated;
|
|
object2 = {};
|
|
id = a1.id;
|
|
object2.guildId = id;
|
|
object2.role = value4;
|
|
object2.isPreviewingRoles = isViewingServerShop2;
|
|
if (isSubscriptionGatedBinding(object2)) {
|
|
permissionOverwrites = a0.permissionOverwrites;
|
|
property = permissionOverwrites[property];
|
|
moduleValue = require(3776) /* metro dependency 3776: RolePermissionUtils */;
|
|
isChannelAccessGrantedBy = moduleValue.isChannelAccessGrantedBy;
|
|
reducibleJoin6: while (true) {
|
|
if (Reflect.apply(isChannelAccessGrantedBy, moduleValue, [a0, property])) {
|
|
return true;
|
|
}
|
|
break reducibleJoin6;
|
|
}
|
|
}
|
|
value5 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
|
|
length = value2.length;
|
|
if (value5 < length) {
|
|
r1 = value5;
|
|
continue reducibleLoop4;
|
|
}
|
|
break reducibleLoop4;
|
|
}
|
|
}
|
|
const everyoneRole = GuildRoleStore.getEveryoneRole(a1);
|
|
const hasPermissionBinding = hasPermission;
|
|
const VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
|
|
const hasPermission2 = hasPermissionBinding(everyoneRole, VIEW_CHANNEL);
|
|
const rolePermissionUtilsModule = require(3776) /* metro dependency 3776: RolePermissionUtils */;
|
|
if (!hasPermission2) {
|
|
reducibleJoin14: while (true) {
|
|
if (rolePermissionUtilsModule.isChannelAccessDeniedBy(a0, a0.permissionOverwrites[a1.id])) {
|
|
break reducibleJoin14;
|
|
}
|
|
_createForOfIteratorHelperLoose_21465Binding = _createForOfIteratorHelperLoose_21465;
|
|
getSortedRoles = GuildRoleStore.getSortedRoles;
|
|
id = a1.id;
|
|
value7 = _createForOfIteratorHelperLoose_21465Binding(Reflect.apply(getSortedRoles, GuildRoleStore, [id]));
|
|
value8 = value7();
|
|
done = value8.done;
|
|
if (done) {
|
|
break reducibleJoin14;
|
|
}
|
|
r1 = value8;
|
|
reducibleLoop10: while (true) {
|
|
value9 = r1.value;
|
|
isSubscriptionGatedBinding = isSubscriptionGated;
|
|
object2 = {};
|
|
id = a1.id;
|
|
object2.guildId = id;
|
|
object2.role = value9;
|
|
object2.isPreviewingRoles = isViewingServerShop2;
|
|
if (isSubscriptionGatedBinding(object2)) {
|
|
moduleValue3 = rolePermissionUtilsModule;
|
|
hasViewChannelPermission = moduleValue3.hasViewChannelPermission;
|
|
reducibleJoin12: while (true) {
|
|
if (Reflect.apply(hasViewChannelPermission, moduleValue3, [value9])) {
|
|
return true;
|
|
}
|
|
break reducibleJoin12;
|
|
}
|
|
}
|
|
value10 = value7();
|
|
done = value10.done;
|
|
if (done) {
|
|
break reducibleJoin14;
|
|
}
|
|
r1 = value10;
|
|
continue reducibleLoop10;
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function computeForChannel(a0, a1) { // fn#21470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:2576, offset: 0x00ef18d6, size: 142 bytes, params: 3, frame: 17
|
|
var r0;
|
|
const property = env0_17[a0];
|
|
if (property == null) {
|
|
return false;
|
|
}
|
|
const channel = ChannelStore.getChannel(a1);
|
|
if (channel == null) {
|
|
return false;
|
|
}
|
|
const getGuild = GuildStore.getGuild;
|
|
const getGuildId = channel.getGuildId;
|
|
const value3 = Reflect.apply(getGuild, GuildStore, [Reflect.apply(getGuildId, channel, [])]);
|
|
if (value3 == null) {
|
|
return false;
|
|
}
|
|
const value4 = property.has(a1);
|
|
const isChannelSubscriptionGatedInGuild2 = isChannelSubscriptionGatedInGuild(channel, value3);
|
|
const value5 = value4 !== isChannelSubscriptionGatedInGuild2;
|
|
if (value5) {
|
|
if (isChannelSubscriptionGatedInGuild2) {
|
|
property.add(a1);
|
|
r0 = true;
|
|
} else {
|
|
property.delete(a1);
|
|
r0 = true;
|
|
}
|
|
} else {
|
|
r0 = value5;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function CACHE_LOADED_LAZY_21471() { // fn#21471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:2832, offset: 0x00ef1964, size: 27 bytes, params: 1, frame: 9
|
|
env0_17 = {};
|
|
env0_18.clear();
|
|
}
|
|
|
|
function GUILD_CREATE_21472({guild}) { // fn#21472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:2875, offset: 0x00ef197f, size: 28 bytes, params: 2, frame: 2
|
|
delete env0_17[guild.id];
|
|
}
|
|
|
|
function GUILD_ROLE_CREATE_21473({guildId}) { // fn#21473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:2928, offset: 0x00ef199b, size: 23 bytes, params: 2, frame: 2
|
|
delete env0_17[guildId];
|
|
}
|
|
|
|
function CHANNEL_CREATE_21474({channel}) { // fn#21474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:2984, offset: 0x00ef19b2, size: 49 bytes, params: 2, frame: 14
|
|
return channel.guild_id != null && computeForChannel(channel.guild_id, channel.id);
|
|
}
|
|
|
|
function _fun21475(a0) { // fn#21475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:3092, offset: 0x00ef19e3, size: 137 bytes, params: 2, frame: 16
|
|
const closure = GatedChannelStore;
|
|
env0_6(closure, a0);
|
|
return env0_3(closure, [{key: 'initialize', value: function() {
|
|
this.waitFor(ChannelStore, GuildMemberStore, GuildRoleStore, GuildStore, ImpersonateStore, UserStore);
|
|
}}, {key: 'isChannelGated', value: value_21478}, {key: 'isChannelGatedAndVisible', value: value_21479},
|
|
{key: 'isChannelOrThreadParentGated', value: value_21480}]);
|
|
}
|
|
|
|
function GUILD_ROLE_SUBSCRIPTIONS_FETCH_RESTRICTIONS_SUCCESS({guildId, restrictions}) { // fn#21482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:4993, offset: 0x00ef1d1b, size: 81 bytes, params: 2, frame: 14
|
|
const isRestrictedFromShowingGuildPurchaseEntryPoints2 = (require(3777) /* metro dependency 3777: CreatorMonetizationRestrictionsUtils */).isRestrictedFromShowingGuildPurchaseEntryPoints(restrictions);
|
|
const binding = env0_18;
|
|
if (isRestrictedFromShowingGuildPurchaseEntryPoints2) {
|
|
binding.add(guildId);
|
|
} else {
|
|
binding.delete(guildId);
|
|
}
|
|
}
|
|
|
|
function GUILD_ROLE_SUBSCRIPTIONS_FETCH_RESTRICTIONS_FAILURE({guildId}) { // fn#21483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:5207, offset: 0x00ef1d6c, size: 29 bytes, params: 2, frame: 11
|
|
env0_18.add(guildId);
|
|
}
|
|
|
|
function value_21478(a0, a1) { // fn#21478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:3474, offset: 0x00ef1b0c, size: 225 bytes, params: 3, frame: 24
|
|
var r7;
|
|
var r3;
|
|
var guild;
|
|
var binding;
|
|
var set;
|
|
var features;
|
|
var mutableGuildChannelsForGuild;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var add;
|
|
var id;
|
|
if (a0 == null) {
|
|
return false;
|
|
}
|
|
const value = environment.__proto__;
|
|
let property = env1_17[a0];
|
|
if (property != null) {
|
|
r3 = property;
|
|
} else {
|
|
guild = GuildStore.getGuild(a0);
|
|
if (guild != null) {
|
|
binding = env1_17;
|
|
set = new global.Set();
|
|
binding[a0] = set;
|
|
features = guild.features;
|
|
if (features.has(GuildFeatures.ROLE_SUBSCRIPTIONS_ENABLED)) {
|
|
mutableGuildChannelsForGuild = ChannelStore.getMutableGuildChannelsForGuild(a0);
|
|
for (propertyName in mutableGuildChannelsForGuild) {
|
|
property = mutableGuildChannelsForGuild[propertyName];
|
|
if (!isChannelSubscriptionGatedInGuild(property, guild)) {
|
|
r7 = propertyName2;
|
|
continue;
|
|
}
|
|
add = set.add;
|
|
id = property.id;
|
|
Reflect.apply(add, set, [id]);
|
|
r7 = propertyName2;
|
|
}
|
|
}
|
|
}
|
|
property = env1_17[a0];
|
|
r3 = property;
|
|
}
|
|
return r3 != null && r3.has(a1);
|
|
}
|
|
|
|
function value_21479(a0, a1) { // fn#21479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:3860, offset: 0x00ef1bed, size: 58 bytes, params: 3, frame: 14
|
|
var r1;
|
|
var r0;
|
|
var binding;
|
|
let value = a0 != null;
|
|
if (value) {
|
|
value = this.isChannelGated(a0, a1);
|
|
if (value) {
|
|
value = environment.__proto__;
|
|
binding = env1_18;
|
|
value = !binding.has(a0);
|
|
r1 = value;
|
|
} else {
|
|
r1 = value;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_21480(a0, a1) { // fn#21480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:3972, offset: 0x00ef1c27, size: 132 bytes, params: 3, frame: 17
|
|
var has;
|
|
if (a0 == null) {
|
|
return false;
|
|
}
|
|
if (this.isChannelGated(a0, a1)) {
|
|
return true;
|
|
}
|
|
let value = environment.__proto__;
|
|
const channel = ChannelStore.getChannel(a1);
|
|
let r2 = channel == null || channel.parent_id == null;
|
|
if (!r2) {
|
|
has = THREAD_CHANNEL_TYPES.has;
|
|
value = undefined;
|
|
value = !Reflect.apply(has, THREAD_CHANNEL_TYPES, [channel == null ? value : channel.type]);
|
|
r2 = value;
|
|
}
|
|
return !r2 && this.isChannelOrThreadParentGated(a0, channel.parent_id);
|
|
}
|
|
|