1953 lines
90 KiB
TypeScript
1953 lines
90 KiB
TypeScript
/* Metro module 1945; source: stores/GuildMemberStore.tsx; dependencies: [6, 7, 15, 17, 18, 1946, 1937, 1226, 1379, 1938, 1867, 3772, 3, 3773, 1940, 1391, 21, 1857, 1858, 1888, 1360, 1908, 22, 3774, 566, 694, 2] */
|
|
import Logger from '../modules/debug/Logger.tsx'; /* Metro dependency 3 */
|
|
import ClassCallCheck from '../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import SnowflakeUtils from '../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
|
|
import Module00022 from '../by-id/module-00022.js'; /* Metro dependency 22 */
|
|
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import AuthenticationStore from './AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import GuildStore from './GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import ImpersonateStore from '../modules/impersonate/ImpersonateStore.tsx'; /* Metro dependency 1937 */
|
|
import GuildRoleStore from './GuildRoleStore.tsx'; /* Metro dependency 1938 */
|
|
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as GlobalUtilsModule from '../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
|
|
import * as FlagUtilsModule from '../external/discord_common/js/shared/utils/FlagUtils.tsx'; /* Metro dependency 1391 */
|
|
import * as AvatarDecorationUtilsModule from '../modules/collectibles/avatar_decorations/AvatarDecorationUtils.tsx'; /* Metro dependency 1857 */
|
|
import * as MappersModule from '../modules/collectibles/utils/mappers.tsx'; /* Metro dependency 1858 */
|
|
import * as DisplayNameStylesUtilsModule from '../modules/display_name_styles/DisplayNameStylesUtils.tsx'; /* Metro dependency 1888 */
|
|
import * as UseCommunicationDisabledNoticeStoreModule from '../modules/guild_communication_disabled/useCommunicationDisabledNoticeStore.tsx'; /* Metro dependency 1946 */
|
|
import * as GuildMemberConstantsModule from '../modules/guild_member/GuildMemberConstants.tsx'; /* Metro dependency 3772 */
|
|
import * as EmbeddedActivityLocationUtilsModule from '../modules/activities/utils/embeddedActivityLocationUtils.tsx'; /* Metro dependency 3774 */
|
|
|
|
function _fun21588(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:6, offset: 0x00ef477e, size: 1100 bytes, params: 8, frame: 30
|
|
const env0_0 = require;
|
|
const _arrayLikeToArray_21594 = 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 getCommunicationDisabledUserKey2 = getCommunicationDisabledUserKey;
|
|
const getUserIdFromCommunicationDisabledUserKey2 = getUserIdFromCommunicationDisabledUserKey;
|
|
const getGuildIdFromCommunicationDisabledUserKey2 = getGuildIdFromCommunicationDisabledUserKey;
|
|
const GUILD_MEMBER_ADD_216052 = GUILD_MEMBER_ADD_21605;
|
|
const GUILD_ROLE_UPDATE_216132 = GUILD_ROLE_UPDATE_21613;
|
|
const IMPERSONATE_UPDATE_216152 = IMPERSONATE_UPDATE_21615;
|
|
const closure7 = function({message, guildId}) {
|
|
return processMessageResolvedMembers(message, guildId);
|
|
};
|
|
const closure8 = function({messages}) {
|
|
messages.forEach(_fun21624);
|
|
};
|
|
const closure9 = function({data}) {
|
|
data.forEach(_fun21626);
|
|
LOAD_MESSAGES_SUCCESS({messages: []});
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = Logger;
|
|
value = new value('GuildMemberStore');
|
|
let env0_16 = {};
|
|
let env0_17 = {};
|
|
const env0_18 = {};
|
|
let env0_19 = {};
|
|
const env0_20 = {};
|
|
const env0_24 = {};
|
|
const env0_25 = {};
|
|
object = {added: [], removed: []};
|
|
object = {GUILD: 0};
|
|
object[0] = 'GUILD';
|
|
object.USER = 1;
|
|
object[1] = 'USER';
|
|
const Store = (Flux).Store;
|
|
_fun21629(Store).displayName = 'GuildMemberStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
|
{CONNECTION_OPEN: CONNECTION_OPEN_21654, CONNECTION_OPEN_SUPPLEMENTAL: function({guilds}) {
|
|
guilds.forEach(_fun21658);
|
|
}, OVERLAY_INITIALIZE: function({guildMembers}) {
|
|
var r1;
|
|
var object = {};
|
|
copyDataProperties(object, guildMembers, r1);
|
|
env0_16 = object;
|
|
env0_17 = {};
|
|
}, CACHE_LOADED: function({guildMembers, guilds}) {
|
|
var r3;
|
|
env0_21 = true;
|
|
var object = {};
|
|
copyDataProperties(object, guildMembers, r3);
|
|
env0_16 = object;
|
|
env0_17 = {};
|
|
env0_19 = {};
|
|
handleCachedGuilds(guilds);
|
|
}, CACHE_LOADED_LAZY: function({guilds}) {
|
|
handleCachedGuilds(guilds);
|
|
}, GUILD_CREATE: function({guild}) {
|
|
return buildMembers(guild);
|
|
}, GUILD_DELETE: GUILD_DELETE_21664, GUILD_MEMBER_ADD: GUILD_MEMBER_ADD_216052,
|
|
GUILD_MEMBER_UPDATE: GUILD_MEMBER_ADD_216052, GUILD_MEMBER_UPDATE_LOCAL: GUILD_MEMBER_UPDATE_LOCAL_21665,
|
|
GUILD_MEMBERS_CHUNK_BATCH: function(a0) {
|
|
var r2;
|
|
var r3;
|
|
var r7;
|
|
var r0;
|
|
var value5;
|
|
var batchUpdateGuildMembersBinding;
|
|
var guildId;
|
|
var value6;
|
|
var value7;
|
|
var value2 = _createForOfIteratorHelperLoose_21592(a0.chunks);
|
|
var value3 = value2();
|
|
var value4 = false;
|
|
if (value3.done) {
|
|
r0 = value4;
|
|
} else {
|
|
r2 = value4;
|
|
r3 = value3;
|
|
while (true) {
|
|
value5 = r3.value;
|
|
batchUpdateGuildMembersBinding = batchUpdateGuildMembers;
|
|
guildId = value5.guildId;
|
|
value6 = batchUpdateGuildMembersBinding(guildId, value5.members);
|
|
r7 = value6 || r2;
|
|
value7 = value2();
|
|
if (value7.done) {
|
|
r0 = r7;
|
|
break;
|
|
}
|
|
r2 = r7;
|
|
r3 = value7;
|
|
continue;
|
|
}
|
|
}
|
|
return r0;
|
|
}, GUILD_MEMBER_REMOVE: function({guildId, user}) {
|
|
_removeMemberFromGuild(guildId, user.id);
|
|
}, GUILD_MEMBER_REMOVE_LOCAL: function({guildId, userId}) {
|
|
_removeMemberFromGuild(guildId, userId);
|
|
}, THREAD_MEMBER_LIST_UPDATE: function({guildId, members}) {
|
|
return batchUpdateGuildMembers(guildId, members.map(_fun21670).filter(require(dependencyMap[20]).isNotNullish));
|
|
}, THREAD_MEMBERS_UPDATE: THREAD_MEMBERS_UPDATE, LOAD_ARCHIVED_THREADS_SUCCESS: function({guildId, owners}) {
|
|
return batchUpdateGuildMembers(guildId, owners);
|
|
}, LOAD_FORUM_POSTS: LOAD_FORUM_POSTS, GUILD_ROLE_UPDATE: GUILD_ROLE_UPDATE_216132,
|
|
GUILD_ROLE_DELETE: GUILD_ROLE_UPDATE_216132, GUILD_ROLE_MEMBER_REMOVE: GUILD_ROLE_MEMBER_REMOVE,
|
|
GUILD_ROLE_MEMBER_ADD: GUILD_ROLE_MEMBER_ADD, GUILD_MEMBER_PROFILE_UPDATE: GUILD_MEMBER_PROFILE_UPDATE,
|
|
IMPERSONATE_UPDATE: IMPERSONATE_UPDATE_216152, IMPERSONATE_STOP: IMPERSONATE_UPDATE_216152,
|
|
PASSIVE_UPDATE_V2: PASSIVE_UPDATE_V2,
|
|
CLEAR_PENDING_CHANNEL_AND_ROLE_UPDATES: CLEAR_PENDING_CHANNEL_AND_ROLE_UPDATES,
|
|
LOCAL_MESSAGES_LOADED: LOCAL_MESSAGES_LOADED, MESSAGE_CREATE: closure7, MESSAGE_UPDATE: closure7,
|
|
LOAD_MESSAGES_SUCCESS: closure8, LOAD_MESSAGES_AROUND_SUCCESS: closure8, LOAD_RECENT_MENTIONS_SUCCESS: closure8,
|
|
LOAD_PINNED_MESSAGES_SUCCESS: function({pins}) {
|
|
pins.forEach(_fun21684);
|
|
}, SEARCH_MESSAGES_SUCCESS: closure9, MOD_VIEW_SEARCH_MESSAGES_SUCCESS: closure9,
|
|
MEMBER_SAFETY_GUILD_MEMBER_SEARCH_SUCCESS: MEMBER_SAFETY_GUILD_MEMBER_SEARCH_SUCCESS,
|
|
EMBEDDED_ACTIVITY_UPDATE_V2: EMBEDDED_ACTIVITY_UPDATE_V2_21687,
|
|
INTERACTION_MODAL_CREATE: INTERACTION_MODAL_CREATE});
|
|
(FileImportTrackerModule).fileFinishedImporting('stores/GuildMemberStore.tsx');
|
|
exports.default = value;
|
|
exports.getUserCommunicationDisabledVersion = getUserCommunicationDisabledVersion;
|
|
exports.getCommunicationDisabledUserKey = getCommunicationDisabledUserKey2;
|
|
exports.getUserIdFromCommunicationDisabledUserKey = getUserIdFromCommunicationDisabledUserKey2;
|
|
exports.getGuildIdFromCommunicationDisabledUserKey = getGuildIdFromCommunicationDisabledUserKey2;
|
|
function _isNativeReflectConstruct_21589() { // fn#21589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:274, offset: 0x00ef4bca, 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_21589_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _createForOfIteratorHelperLoose_21592(a0, a1) { // fn#21592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:467, offset: 0x00ef4c28, 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 _fun21593;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_21594(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_21594(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_21594(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun21593;
|
|
}
|
|
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 _fun21593() { // fn#21593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:1038, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
|
|
return env0_1 >= env0_0.length ? {done: true} : {done: false,
|
|
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
|
|
}
|
|
|
|
}
|
|
|
|
function trackCommunicationDisabled(a0, a1) { // fn#21595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:1489, offset: 0x00ef4d9a, size: 174 bytes, params: 3, frame: 18
|
|
var communicationDisabledUserKey;
|
|
if (a1.communicationDisabledUntil == null) {
|
|
removeCommunicationDisabled(a0, a1.userId);
|
|
} else {
|
|
var moduleValue = require(3773) /* metro dependency 3773: CommunicationDisabledUtils */;
|
|
if (moduleValue.isMemberCommunicationDisabled(a1)) {
|
|
communicationDisabledUserKey = getCommunicationDisabledUserKey(a0, a1.userId);
|
|
if (env0_20[communicationDisabledUserKey] !== a1.communicationDisabledUntil && (require(3773) /* metro dependency 3773: CommunicationDisabledUtils */).isMemberCommunicationDisabled(a1)) {
|
|
env0_20[communicationDisabledUserKey] = a1.communicationDisabledUntil;
|
|
incrementCommunicationDisabledVersion(communicationDisabledUserKey);
|
|
}
|
|
return undefined;
|
|
}
|
|
removeCommunicationDisabled(a0, a1.userId);
|
|
}
|
|
}
|
|
|
|
function removeCommunicationDisabled(a0, a1) { // fn#21596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:1868, offset: 0x00ef4e48, size: 133 bytes, params: 3, frame: 21
|
|
var r7;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var communicationDisabledUserKey;
|
|
if (a1 != null) {
|
|
communicationDisabledUserKey = getCommunicationDisabledUserKey(a0, a1);
|
|
if (env0_20[communicationDisabledUserKey] != null) {
|
|
incrementCommunicationDisabledVersion(communicationDisabledUserKey);
|
|
}
|
|
_removeCommunicationDisabledFromMap(getCommunicationDisabledUserKey(a0, a1));
|
|
} else {
|
|
for (propertyName in env0_20) {
|
|
if (getGuildIdFromCommunicationDisabledUserKey(propertyName) !== a0) {
|
|
r7 = propertyName2;
|
|
continue;
|
|
}
|
|
incrementCommunicationDisabledVersion(propertyName);
|
|
_removeCommunicationDisabledFromMap(propertyName);
|
|
r7 = propertyName2;
|
|
}
|
|
}
|
|
}
|
|
|
|
function incrementCommunicationDisabledVersion(a0) { // fn#21597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:2255, offset: 0x00ef4ecd, size: 33 bytes, params: 2, frame: 3
|
|
env0_24[a0] = env0_22 + 1;
|
|
}
|
|
|
|
function _removeCommunicationDisabledFromMap(a0) { // fn#21598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:2317, offset: 0x00ef4eee, size: 63 bytes, params: 2, frame: 14
|
|
const userIdFromCommunicationDisabledUserKey = getUserIdFromCommunicationDisabledUserKey(a0);
|
|
const authenticationStoreBinding = AuthenticationStore;
|
|
const getId = authenticationStoreBinding.getId;
|
|
if (userIdFromCommunicationDisabledUserKey === Reflect.apply(getId, authenticationStoreBinding, [])) {
|
|
clearCommunicationDisabledNotice(getGuildIdFromCommunicationDisabledUserKey(a0));
|
|
}
|
|
delete env0_20[a0];
|
|
}
|
|
|
|
function getCommunicationDisabledUserKey(a0, a1) { // fn#21599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:2559, offset: 0x00ef4f2d, size: 57 bytes, params: 3, frame: 12
|
|
const items2 = [];
|
|
const GUILD = env0_27.GUILD;
|
|
items2[GUILD] = a0;
|
|
const USER = env0_27.USER;
|
|
items2[USER] = a1;
|
|
return items2.join('-');
|
|
}
|
|
|
|
function getUserIdFromCommunicationDisabledUserKey(a0) { // fn#21600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:2658, offset: 0x00ef4f66, size: 36 bytes, params: 2, frame: 11
|
|
const value = a0.split('-');
|
|
const USER = env0_27.USER;
|
|
return value[USER];
|
|
}
|
|
|
|
function getGuildIdFromCommunicationDisabledUserKey(a0) { // fn#21601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:2740, offset: 0x00ef4f8a, size: 36 bytes, params: 2, frame: 11
|
|
const value = a0.split('-');
|
|
const GUILD = env0_27.GUILD;
|
|
return value[GUILD];
|
|
}
|
|
|
|
function computeDerivedMemberState(a0, a1) { // fn#21602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:2824, offset: 0x00ef4fae, size: 578 bytes, params: 3, frame: 37
|
|
var r4;
|
|
var r8;
|
|
var r9;
|
|
var r10;
|
|
var r11;
|
|
var r22;
|
|
var r0;
|
|
var r23;
|
|
var r24;
|
|
var r25;
|
|
var r17;
|
|
var r18;
|
|
var r19;
|
|
var r20;
|
|
var r2;
|
|
var r5;
|
|
var r6;
|
|
var r7;
|
|
var value6;
|
|
var property;
|
|
var value7;
|
|
var moduleValue;
|
|
var value8;
|
|
var color;
|
|
var value9;
|
|
var value10;
|
|
var moduleValue2;
|
|
var value11;
|
|
var hoist;
|
|
var value12;
|
|
var moduleValue3;
|
|
var value13;
|
|
var icon;
|
|
var value14;
|
|
var unicodeEmoji;
|
|
var value15;
|
|
var value16;
|
|
var moduleValue4;
|
|
var value17;
|
|
var value18;
|
|
if (a1.length === 0) {
|
|
return {'colorString': null, 'colorStrings': null, colorRoleId: undefined, hoistRoleId: undefined,
|
|
iconRoleId: undefined, highestRoleId: undefined};
|
|
}
|
|
const _createForOfIteratorHelperLoose_21592Binding = _createForOfIteratorHelperLoose_21592;
|
|
const value2 = undefined;
|
|
const value3 = _createForOfIteratorHelperLoose_21592Binding(a1);
|
|
const value4 = value3();
|
|
let done = value4.done;
|
|
const value5 = null;
|
|
if (done) {
|
|
r2 = value2;
|
|
r5 = value2;
|
|
r6 = value2;
|
|
r7 = value2;
|
|
} else {
|
|
r4 = value4;
|
|
r8 = value2;
|
|
r9 = value2;
|
|
r10 = value2;
|
|
r11 = value2;
|
|
while (true) {
|
|
value6 = r4.value;
|
|
property = a0[value6];
|
|
if (value5 != property) {
|
|
value7 = value5 == r8;
|
|
if (value7) {
|
|
r22 = value7;
|
|
continue;
|
|
}
|
|
moduleValue = require(1940) /* metro dependency 1940: GuildRoleUtils */;
|
|
value8 = moduleValue.doesRoleSortHigher(property, r8);
|
|
r22 = value8;
|
|
if (r22) {
|
|
r0 = property;
|
|
continue;
|
|
}
|
|
r0 = r8;
|
|
continue;
|
|
color = property.color;
|
|
value9 = color > 0;
|
|
if (!value9) {
|
|
r22 = value9;
|
|
continue;
|
|
}
|
|
value10 = value5 == r11;
|
|
if (value10) {
|
|
r23 = value10;
|
|
continue;
|
|
}
|
|
moduleValue2 = require(1940) /* metro dependency 1940: GuildRoleUtils */;
|
|
value11 = moduleValue2.doesRoleSortHigher(property, r11);
|
|
r23 = value11;
|
|
r22 = r23;
|
|
if (r22) {
|
|
r23 = property;
|
|
continue;
|
|
}
|
|
r23 = r11;
|
|
continue;
|
|
hoist = property.hoist;
|
|
if (!hoist) {
|
|
r24 = hoist;
|
|
continue;
|
|
}
|
|
value12 = value5 == r10;
|
|
if (value12) {
|
|
r22 = value12;
|
|
continue;
|
|
}
|
|
moduleValue3 = require(1940) /* metro dependency 1940: GuildRoleUtils */;
|
|
value13 = moduleValue3.doesRoleSortHigher(property, r10);
|
|
r22 = value13;
|
|
r24 = r22;
|
|
if (r24) {
|
|
r22 = property;
|
|
continue;
|
|
}
|
|
r22 = r10;
|
|
continue;
|
|
icon = property.icon;
|
|
value14 = value5 != icon;
|
|
if (value14) {
|
|
r24 = value14;
|
|
continue;
|
|
}
|
|
unicodeEmoji = property.unicodeEmoji;
|
|
value15 = value5 != unicodeEmoji;
|
|
r24 = value15;
|
|
if (!r24) {
|
|
continue;
|
|
}
|
|
value16 = value5 == r9;
|
|
if (value16) {
|
|
r25 = value16;
|
|
continue;
|
|
}
|
|
moduleValue4 = require(1940) /* metro dependency 1940: GuildRoleUtils */;
|
|
value17 = moduleValue4.doesRoleSortHigher(property, r9);
|
|
r25 = value17;
|
|
r24 = r25;
|
|
if (r24) {
|
|
r17 = r0;
|
|
r18 = property;
|
|
r19 = r22;
|
|
r20 = r23;
|
|
break;
|
|
}
|
|
r17 = r0;
|
|
r18 = r9;
|
|
r19 = r22;
|
|
r20 = r23;
|
|
break;
|
|
}
|
|
r17 = r8;
|
|
r18 = r9;
|
|
r19 = r10;
|
|
r20 = r11;
|
|
value18 = value3();
|
|
done = value18.done;
|
|
if (done) {
|
|
r2 = r17;
|
|
r5 = r19;
|
|
r6 = r18;
|
|
r7 = r20;
|
|
break;
|
|
}
|
|
r4 = value18;
|
|
r8 = r17;
|
|
r9 = r18;
|
|
r10 = r19;
|
|
r11 = r20;
|
|
continue;
|
|
}
|
|
}
|
|
const colorString = value5 == r7 ? value2 : r7.colorString;
|
|
const colorStrings = value5 == r7 ? value2 : r7.colorStrings;
|
|
return {colorString: value5 != colorString ? colorString : value5,
|
|
colorStrings: value5 != colorStrings ? colorStrings : value5, colorRoleId: value5 == r7 ? value2 : r7.id,
|
|
iconRoleId: value5 == r6 ? value2 : r6.id, hoistRoleId: value5 == r5 ? value2 : r5.id,
|
|
highestRoleId: value5 == r2 ? value2 : r2.id};
|
|
}
|
|
|
|
function createMember({userId, nick, guildId, avatar, avatarDecoration, guildRoles, roles, premiumSince, isPending, joinedAt, communicationDisabledUntil, unusualDMActivityUntil, fullProfileLoadedTimestamp, flags, collectibles, displayNameStyles}) { // fn#21603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:3664, offset: 0x00ef51f0, size: 585 bytes, params: 2, frame: 29
|
|
var r5;
|
|
var moduleValue2;
|
|
var impersonateStoreBinding;
|
|
var viewingRoles;
|
|
var binding;
|
|
var object;
|
|
var value;
|
|
const derivedMemberState = computeDerivedMemberState(guildRoles, roles);
|
|
const object2 = {userId: userId, nick: nick, guildId: guildId, avatar: avatar, avatarDecoration: avatarDecoration,
|
|
roles: roles};
|
|
object2.colorString = derivedMemberState.colorString;
|
|
object2.colorStrings = derivedMemberState.colorStrings;
|
|
object2.colorRoleId = derivedMemberState.colorRoleId;
|
|
object2.iconRoleId = derivedMemberState.iconRoleId;
|
|
object2.hoistRoleId = derivedMemberState.hoistRoleId;
|
|
object2.highestRoleId = derivedMemberState.highestRoleId;
|
|
object2.premiumSince = premiumSince;
|
|
object2.isPending = isPending;
|
|
object2.joinedAt = joinedAt;
|
|
object2.communicationDisabledUntil = communicationDisabledUntil;
|
|
object2.unusualDMActivityUntil = unusualDMActivityUntil;
|
|
object2.fullProfileLoadedTimestamp = fullProfileLoadedTimestamp;
|
|
object2.flags = flags;
|
|
object2.collectibles = collectibles;
|
|
object2.displayNameStyles = displayNameStyles;
|
|
const hasFlag = FlagUtilsModule.hasFlag;
|
|
const r6 = object2.flags ?? 0;
|
|
const IS_GUEST = GuildMemberFlags.IS_GUEST;
|
|
if (Reflect.apply(hasFlag, FlagUtilsModule, [r6, IS_GUEST])) {
|
|
moduleValue2 = FlagUtilsModule;
|
|
object2.flags = moduleValue2.addFlag(object2.flags ?? 0, GuildMemberFlags.BYPASSES_VERIFICATION);
|
|
}
|
|
if (env0_16[guildId] != null) {
|
|
var authenticationStoreBinding = AuthenticationStore;
|
|
var getId = authenticationStoreBinding.getId;
|
|
if (userId === Reflect.apply(getId, authenticationStoreBinding, [])) {
|
|
if (Reflect.apply(ImpersonateStore.isViewingRoles, impersonateStoreBinding, [guildId])) {
|
|
viewingRoles = ImpersonateStore.getViewingRoles(guildId);
|
|
binding = env0_18;
|
|
object = {};
|
|
copyDataProperties(object, object2, undefined);
|
|
impersonateStoreBinding = ImpersonateStore;
|
|
copyDataProperties(object, impersonateStoreBinding.getMemberOptions(guildId), undefined);
|
|
if (viewingRoles != null) {
|
|
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
value = value.keys(viewingRoles);
|
|
r5 = value;
|
|
} else {
|
|
r5 = [];
|
|
}
|
|
object['roles'] = r5;
|
|
binding[guildId] = object;
|
|
} else if (Reflect.apply(ImpersonateStore.isFullServerPreview, impersonateStoreBinding, [guildId])) {
|
|
viewingRoles = ImpersonateStore.getViewingRoles(guildId);
|
|
binding = env0_18;
|
|
object = {};
|
|
copyDataProperties(object, object2, undefined);
|
|
impersonateStoreBinding = ImpersonateStore;
|
|
copyDataProperties(object, impersonateStoreBinding.getMemberOptions(guildId), undefined);
|
|
if (viewingRoles != null) {
|
|
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
value = value.keys(viewingRoles);
|
|
r5 = value;
|
|
} else {
|
|
r5 = [];
|
|
}
|
|
object['roles'] = r5;
|
|
binding[guildId] = object;
|
|
} else if (env0_18[guildId] != null) {
|
|
delete env0_18[guildId];
|
|
}
|
|
}
|
|
}
|
|
return object2;
|
|
}
|
|
|
|
function handleCachedGuilds(a0) { // fn#21604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:4713, offset: 0x00ef5439, size: 271 bytes, params: 2, frame: 22
|
|
var r12;
|
|
var r3;
|
|
var r1;
|
|
var value4;
|
|
var member;
|
|
var binding;
|
|
var id;
|
|
var property;
|
|
var object;
|
|
var roles;
|
|
var userId;
|
|
var userId2;
|
|
var value5;
|
|
var value6;
|
|
const value2 = _createForOfIteratorHelperLoose_21592(a0);
|
|
const value3 = value2();
|
|
let done = value3.done;
|
|
if (!done) {
|
|
r3 = value3;
|
|
while (true) {
|
|
value4 = r3.value;
|
|
member = value4.member;
|
|
if (member != null) {
|
|
binding = env0_19;
|
|
id = value4.id;
|
|
property = binding[id];
|
|
binding = env0_19;
|
|
id = value4.id;
|
|
if (property == null) {
|
|
r1 = value4.member;
|
|
} else {
|
|
object = {};
|
|
member = value4.member;
|
|
copyDataProperties(object, member, r12);
|
|
member = value4.member;
|
|
roles = member.roles;
|
|
object['roles'] = roles;
|
|
r1 = object;
|
|
r12 = roles;
|
|
}
|
|
binding[id] = r1;
|
|
binding = env0_16;
|
|
id = value4.id;
|
|
if (binding[id] == null) {
|
|
break;
|
|
}
|
|
binding = env0_16;
|
|
id = value4.id;
|
|
property = binding[id];
|
|
member = value4.member;
|
|
userId = member.userId;
|
|
if (property[userId] == null) {
|
|
break;
|
|
}
|
|
member = value4.member;
|
|
userId = member.userId;
|
|
object = {};
|
|
member = value4.member;
|
|
userId2 = member.userId;
|
|
value5 = copyDataProperties(object, property[userId2], userId2);
|
|
member = value4.member;
|
|
roles = member.roles;
|
|
object['roles'] = roles;
|
|
property[userId] = object;
|
|
r12 = value5;
|
|
break;
|
|
}
|
|
value6 = value2();
|
|
done = value6.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r3 = value6;
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
|
|
function GUILD_MEMBER_ADD_21605({guildId, user, nick, avatar, avatarDecoration, roles, premiumSince, isPending, joinedAt, communicationDisabledUntil, unusualDMActivityUntil, flags, collectibles, displayNameStyles}) { // fn#21605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:5041, offset: 0x00ef5548, size: 379 bytes, params: 2, frame: 31
|
|
const property = env0_16[guildId];
|
|
if (property == null) {
|
|
return false;
|
|
}
|
|
const guild = GuildStore.getGuild(guildId);
|
|
if (guild == null) {
|
|
env0_15.warn('Guild ' + guildId + ' not found during GUILD_MEMBER_UPDATE.');
|
|
return false;
|
|
}
|
|
const id = user.id;
|
|
const createMemberBinding = createMember;
|
|
const object = {};
|
|
object.userId = user.id;
|
|
object.nick = nick;
|
|
object.guildId = guildId;
|
|
object.avatar = avatar;
|
|
object.avatarDecoration = (require(1857) /* metro dependency 1857: AvatarDecorationUtils */).parseAvatarDecorationData(avatarDecoration);
|
|
object.guildRoles = GuildRoleStore.getUnsafeMutableRoles(guild.id);
|
|
object.roles = roles;
|
|
object.premiumSince = premiumSince;
|
|
object.isPending = isPending;
|
|
object.joinedAt = joinedAt;
|
|
object.communicationDisabledUntil = communicationDisabledUntil;
|
|
object.unusualDMActivityUntil = unusualDMActivityUntil;
|
|
object.fullProfileLoadedTimestamp = property[user.id]?.fullProfileLoadedTimestamp;
|
|
object.flags = flags;
|
|
object.collectibles = collectibles;
|
|
object.displayNameStyles = displayNameStyles;
|
|
property[id] = createMemberBinding(object);
|
|
trackCommunicationDisabled(guildId, property[user.id]);
|
|
}
|
|
|
|
function batchUpdateGuildMembers(a0, a1) { // fn#21606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:5826, offset: 0x00ef56c3, size: 139 bytes, params: 3, frame: 16
|
|
var r0;
|
|
var binding;
|
|
const env0_0 = a0;
|
|
if (env0_16[a0] == null) {
|
|
return false;
|
|
}
|
|
if (GuildStore.getGuild(a0) == null) {
|
|
env0_15.warn('Guild ' + a0 + ' not found during batchUpdateGuildMembers.');
|
|
r0 = false;
|
|
} else {
|
|
a1.forEach(_fun21607);
|
|
binding = env0_23;
|
|
env0_23 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
|
r0 = true;
|
|
}
|
|
return r0;
|
|
function _fun21607(a0) { // fn#21607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:6010, offset: 0x00ef574e, size: 370 bytes, params: 2, frame: 22
|
|
let binding = env0_1;
|
|
let user = a0.user;
|
|
let id = user.id;
|
|
const property = binding[id];
|
|
user = a0.user;
|
|
id = user.id;
|
|
const createMemberBinding = createMember;
|
|
const object = {};
|
|
user = a0.user;
|
|
object.userId = user.id;
|
|
object.nick = a0.nick;
|
|
object.guildId = env0_0;
|
|
object.avatar = a0.avatar;
|
|
const getAvatarDecorationFromServerMemberBinding = getAvatarDecorationFromServerMember;
|
|
const value3 = undefined;
|
|
object.avatarDecoration = getAvatarDecorationFromServerMemberBinding(a0);
|
|
object.guildRoles = GuildRoleStore.getUnsafeMutableRoles(env0_2.id);
|
|
object.roles = a0.roles;
|
|
object.premiumSince = a0.premium_since;
|
|
object.isPending = a0.pending;
|
|
object.joinedAt = a0.joined_at;
|
|
object.communicationDisabledUntil = a0.communication_disabled_until;
|
|
object.flags = a0.flags;
|
|
object.fullProfileLoadedTimestamp = property == null ? value3 : property.fullProfileLoadedTimestamp;
|
|
object.unusualDMActivityUntil = a0.unusual_dm_activity_until ?? (property == null ? value3 : property.unusualDMActivityUntil);
|
|
object.collectibles = MappersModule.parseServerUserCollectibles(a0.collectibles);
|
|
object.displayNameStyles = DisplayNameStylesUtilsModule.parseServerDisplayNameStyles(a0.display_name_styles);
|
|
binding[id] = createMemberBinding(object);
|
|
const trackCommunicationDisabledBinding = trackCommunicationDisabled;
|
|
binding = env0_0;
|
|
const binding2 = env0_1;
|
|
user = a0.user;
|
|
trackCommunicationDisabledBinding(binding, binding2[user.id]);
|
|
return value3;
|
|
}
|
|
|
|
}
|
|
|
|
function getAvatarDecorationFromServerMember({avatar_decoration_data}) { // fn#21608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:6747, offset: 0x00ef58c0, size: 47 bytes, params: 2, frame: 11
|
|
return (AvatarDecorationUtilsModule).parseAvatarDecorationData(avatar_decoration_data);
|
|
}
|
|
|
|
function _removeMemberFromGuild(a0, a1) { // fn#21609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:6864, offset: 0x00ef58ef, size: 64 bytes, params: 3, frame: 15
|
|
const property = env0_16[a0];
|
|
if (property == null) {
|
|
return false;
|
|
}
|
|
if (property[a1] == null) {
|
|
return false;
|
|
}
|
|
delete property[a1];
|
|
removeCommunicationDisabled(a0, a1);
|
|
const binding = env0_23;
|
|
env0_23 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
|
}
|
|
|
|
function buildMembersFromActivityParticipants(a0, a1) { // fn#21610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:6993, offset: 0x00ef592f, size: 80 bytes, params: 3, frame: 15
|
|
const buildMembersBinding = buildMembers;
|
|
const object = {id: a0};
|
|
object.members = a1.filter(importDefault(1908) /* metro dependency 1908: isActivityParticipantValidGuildMember */).map(function(a0) {
|
|
return a0.member;
|
|
});
|
|
return buildMembersBinding(object);
|
|
}
|
|
|
|
function buildMembers(a0) { // fn#21612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:7118, offset: 0x00ef598a, size: 438 bytes, params: 2, frame: 29
|
|
var r1;
|
|
var fullProfileLoadedTimestamp;
|
|
var unusualDMActivityUntil;
|
|
var r15;
|
|
var value6;
|
|
var user;
|
|
var id3;
|
|
var property2;
|
|
var createMemberBinding;
|
|
var object;
|
|
var nick;
|
|
var id4;
|
|
var avatar;
|
|
var guildRoleStoreBinding;
|
|
var getUnsafeMutableRoles;
|
|
var id5;
|
|
var roles;
|
|
var premium_since;
|
|
var pending;
|
|
var joined_at;
|
|
var communication_disabled_until;
|
|
var flags;
|
|
var unusual_dm_activity_until;
|
|
var moduleValue;
|
|
var parseServerUserCollectibles;
|
|
var collectibles;
|
|
var moduleValue2;
|
|
var parseServerDisplayNameStyles;
|
|
var display_name_styles;
|
|
var member;
|
|
var value7;
|
|
const id = a0.id;
|
|
if (!(id in env0_16)) {
|
|
env0_16[a0.id] = {};
|
|
}
|
|
const guild = GuildStore.getGuild(id);
|
|
if (guild == null) {
|
|
return false;
|
|
}
|
|
const property = env0_16[id];
|
|
const _createForOfIteratorHelperLoose_21592Binding = _createForOfIteratorHelperLoose_21592;
|
|
const members = a0.members;
|
|
const value3 = undefined;
|
|
const value4 = _createForOfIteratorHelperLoose_21592Binding(members);
|
|
const value5 = value4();
|
|
let done = value5.done;
|
|
if (!done) {
|
|
r1 = value5;
|
|
while (true) {
|
|
value6 = r1.value;
|
|
user = value6.user;
|
|
id3 = user.id;
|
|
property2 = property[id3];
|
|
createMemberBinding = createMember;
|
|
object = {userId: id3};
|
|
nick = value6.nick;
|
|
object.nick = nick;
|
|
id4 = a0.id;
|
|
object.guildId = id4;
|
|
avatar = value6.avatar;
|
|
object.avatar = avatar;
|
|
object.avatarDecoration = getAvatarDecorationFromServerMember(value6);
|
|
guildRoleStoreBinding = GuildRoleStore;
|
|
getUnsafeMutableRoles = guildRoleStoreBinding.getUnsafeMutableRoles;
|
|
id5 = guild.id;
|
|
object.guildRoles = Reflect.apply(getUnsafeMutableRoles, guildRoleStoreBinding, [id5]);
|
|
roles = value6.roles;
|
|
object.roles = roles;
|
|
premium_since = value6.premium_since;
|
|
object.premiumSince = premium_since;
|
|
pending = value6.pending;
|
|
object.isPending = pending;
|
|
joined_at = value6.joined_at;
|
|
object.joinedAt = joined_at;
|
|
communication_disabled_until = value6.communication_disabled_until;
|
|
object.communicationDisabledUntil = communication_disabled_until;
|
|
fullProfileLoadedTimestamp = property2 == null ? value3 : property2.fullProfileLoadedTimestamp;
|
|
object.fullProfileLoadedTimestamp = fullProfileLoadedTimestamp;
|
|
flags = value6.flags;
|
|
object.flags = flags;
|
|
unusual_dm_activity_until = value6.unusual_dm_activity_until;
|
|
if (unusual_dm_activity_until != null) {
|
|
r15 = unusual_dm_activity_until;
|
|
continue;
|
|
}
|
|
if (property2 == null) {
|
|
unusualDMActivityUntil = value3;
|
|
continue;
|
|
}
|
|
unusualDMActivityUntil = property2.unusualDMActivityUntil;
|
|
r15 = unusualDMActivityUntil;
|
|
object.unusualDMActivityUntil = r15;
|
|
moduleValue = require(1858) /* metro dependency 1858: mappers */;
|
|
parseServerUserCollectibles = moduleValue.parseServerUserCollectibles;
|
|
collectibles = value6.collectibles;
|
|
object.collectibles = Reflect.apply(parseServerUserCollectibles, moduleValue, [collectibles]);
|
|
moduleValue2 = require(1888) /* metro dependency 1888: DisplayNameStylesUtils */;
|
|
parseServerDisplayNameStyles = moduleValue2.parseServerDisplayNameStyles;
|
|
display_name_styles = value6.display_name_styles;
|
|
object.displayNameStyles = Reflect.apply(parseServerDisplayNameStyles, moduleValue2, [display_name_styles]);
|
|
member = createMemberBinding(object);
|
|
property[id3] = member;
|
|
trackCommunicationDisabled(id, member);
|
|
value7 = value4();
|
|
done = value7.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r1 = value7;
|
|
continue;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
function GUILD_ROLE_DELETE_21613(a0) { // fn#21613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:8018, offset: 0x00ef5b40, size: 515 bytes, params: 2, frame: 31
|
|
var r4;
|
|
var r16;
|
|
var fullProfileLoadedTimestamp;
|
|
var value7;
|
|
var property2;
|
|
var roles;
|
|
var length;
|
|
var colorString;
|
|
var hoistRoleId;
|
|
var type;
|
|
var filter;
|
|
var value8;
|
|
var createMemberBinding;
|
|
var object;
|
|
var nick;
|
|
var avatar;
|
|
var avatarDecoration;
|
|
var guildRoleStoreBinding;
|
|
var getUnsafeMutableRoles;
|
|
var id;
|
|
var premiumSince;
|
|
var isPending;
|
|
var joinedAt;
|
|
var flags;
|
|
var collectibles;
|
|
var displayNameStyles;
|
|
var trackCommunicationDisabledBinding;
|
|
var value9;
|
|
const env0_0 = a0;
|
|
let binding = env0_16;
|
|
let guildId = a0.guildId;
|
|
const property = binding[guildId];
|
|
if (property == null) {
|
|
return false;
|
|
}
|
|
const guild = GuildStore.getGuild(a0.guildId);
|
|
if (guild == null) {
|
|
binding = env0_15;
|
|
binding.warn('Guild ' + a0.guildId + ' not found during ' + a0.type + '.');
|
|
return false;
|
|
}
|
|
const id2 = AuthenticationStore.getId();
|
|
const _createForOfIteratorHelperLoose_21592Binding = _createForOfIteratorHelperLoose_21592;
|
|
const value4 = undefined;
|
|
const defaultImport = SnowflakeUtils;
|
|
const value5 = _createForOfIteratorHelperLoose_21592Binding(defaultImport.keys(property));
|
|
const value6 = value5();
|
|
let done = value6.done;
|
|
if (!done) {
|
|
r4 = value6;
|
|
reducibleLoop3: while (true) {
|
|
value7 = r4.value;
|
|
property2 = property[value7];
|
|
roles = property2.roles;
|
|
reducibleJoin14: while (true) {
|
|
reducibleJoin13: while (true) {
|
|
if (roles == null) {
|
|
colorString = property2.colorString;
|
|
if (colorString == null) {
|
|
hoistRoleId = property2.hoistRoleId;
|
|
if (hoistRoleId == null) {
|
|
break reducibleJoin14;
|
|
}
|
|
}
|
|
reducibleJoin11: while (true) {
|
|
reducibleJoin9: while (true) {
|
|
if (value7 !== id2) {
|
|
break reducibleJoin9;
|
|
}
|
|
type = a0.type;
|
|
if (type === 'GUILD_ROLE_DELETE') {
|
|
roles = property2.roles;
|
|
filter = roles.filter;
|
|
value8 = Reflect.apply(filter, roles, [_fun21614]);
|
|
r16 = value8;
|
|
break reducibleJoin11;
|
|
}
|
|
break reducibleJoin9;
|
|
}
|
|
roles = property2.roles;
|
|
r16 = roles;
|
|
break reducibleJoin11;
|
|
}
|
|
createMemberBinding = createMember;
|
|
object = {userId: value7};
|
|
object.nick = property2.nick;
|
|
object.guildId = a0.guildId;
|
|
object.avatar = property2.avatar;
|
|
object.avatarDecoration = property2.avatarDecoration;
|
|
guildRoleStoreBinding = GuildRoleStore;
|
|
object.guildRoles = guildRoleStoreBinding.getUnsafeMutableRoles(guild.id);
|
|
object.roles = r16;
|
|
object.premiumSince = property2.premiumSince;
|
|
object.isPending = property2.isPending;
|
|
object.joinedAt = property2.joinedAt;
|
|
object.flags = property2.flags;
|
|
if (property2 == null) {
|
|
fullProfileLoadedTimestamp = value4;
|
|
break reducibleJoin13;
|
|
}
|
|
fullProfileLoadedTimestamp = property2.fullProfileLoadedTimestamp;
|
|
break reducibleJoin13;
|
|
}
|
|
roles = property2.roles;
|
|
length = roles.length;
|
|
if (!(length > 0)) {
|
|
colorString = property2.colorString;
|
|
if (colorString == null) {
|
|
hoistRoleId = property2.hoistRoleId;
|
|
if (hoistRoleId == null) {
|
|
break reducibleJoin14;
|
|
}
|
|
}
|
|
}
|
|
reducibleJoin11: while (true) {
|
|
reducibleJoin9: while (true) {
|
|
if (value7 !== id2) {
|
|
break reducibleJoin9;
|
|
}
|
|
type = a0.type;
|
|
if (type === 'GUILD_ROLE_DELETE') {
|
|
roles = property2.roles;
|
|
filter = roles.filter;
|
|
value8 = Reflect.apply(filter, roles, [_fun21614]);
|
|
r16 = value8;
|
|
break reducibleJoin11;
|
|
}
|
|
break reducibleJoin9;
|
|
}
|
|
roles = property2.roles;
|
|
r16 = roles;
|
|
break reducibleJoin11;
|
|
}
|
|
createMemberBinding = createMember;
|
|
object = {userId: value7};
|
|
nick = property2.nick;
|
|
object.nick = nick;
|
|
guildId = a0.guildId;
|
|
object.guildId = guildId;
|
|
avatar = property2.avatar;
|
|
object.avatar = avatar;
|
|
avatarDecoration = property2.avatarDecoration;
|
|
object.avatarDecoration = avatarDecoration;
|
|
guildRoleStoreBinding = GuildRoleStore;
|
|
getUnsafeMutableRoles = guildRoleStoreBinding.getUnsafeMutableRoles;
|
|
id = guild.id;
|
|
object.guildRoles = Reflect.apply(getUnsafeMutableRoles, guildRoleStoreBinding, [id]);
|
|
object.roles = r16;
|
|
premiumSince = property2.premiumSince;
|
|
object.premiumSince = premiumSince;
|
|
isPending = property2.isPending;
|
|
object.isPending = isPending;
|
|
joinedAt = property2.joinedAt;
|
|
object.joinedAt = joinedAt;
|
|
flags = property2.flags;
|
|
object.flags = flags;
|
|
if (property2 == null) {
|
|
fullProfileLoadedTimestamp = value4;
|
|
break reducibleJoin13;
|
|
}
|
|
fullProfileLoadedTimestamp = property2.fullProfileLoadedTimestamp;
|
|
break reducibleJoin13;
|
|
}
|
|
object.fullProfileLoadedTimestamp = fullProfileLoadedTimestamp;
|
|
collectibles = property2.collectibles;
|
|
object.collectibles = collectibles;
|
|
displayNameStyles = property2.displayNameStyles;
|
|
object.displayNameStyles = displayNameStyles;
|
|
property[value7] = createMemberBinding(object);
|
|
trackCommunicationDisabledBinding = trackCommunicationDisabled;
|
|
guildId = a0.guildId;
|
|
trackCommunicationDisabledBinding(guildId, property[value7]);
|
|
break reducibleJoin14;
|
|
}
|
|
value9 = value5();
|
|
done = value9.done;
|
|
if (done) {
|
|
break reducibleLoop3;
|
|
}
|
|
r4 = value9;
|
|
continue reducibleLoop3;
|
|
}
|
|
}
|
|
return value4;
|
|
function _fun21614(a0) { // fn#21614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:8452, offset: 0x00ef5d43, size: 22 bytes, params: 2, frame: 2
|
|
return a0 !== env0_0.roleId;
|
|
}
|
|
|
|
}
|
|
|
|
function IMPERSONATE_STOP_21615({guildId}) { // fn#21615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:8905, offset: 0x00ef5d59, size: 303 bytes, params: 2, frame: 19
|
|
const property = env0_16[guildId];
|
|
if (property == null) {
|
|
return false;
|
|
}
|
|
const guild = GuildStore.getGuild(guildId);
|
|
if (guild == null) {
|
|
env0_15.warn('Guild ' + guildId + ' not found during IMPERSONATE_UPDATE.');
|
|
return false;
|
|
}
|
|
const id = AuthenticationStore.getId();
|
|
const property2 = property[id];
|
|
const createMemberBinding = createMember;
|
|
const guildRoleStoreBinding = GuildRoleStore;
|
|
const getUnsafeMutableRoles = guildRoleStoreBinding.getUnsafeMutableRoles;
|
|
property[id] = createMemberBinding({userId: id, nick: property2.nick, guildId: guildId, avatar: property2.avatar,
|
|
avatarDecoration: property2.avatarDecoration, guildRoles: Reflect.apply(getUnsafeMutableRoles,
|
|
guildRoleStoreBinding, [guild.id]), roles: property2.roles, premiumSince: property2.premiumSince,
|
|
isPending: property2.isPending, joinedAt: property2.joinedAt,
|
|
communicationDisabledUntil: property2.communicationDisabledUntil,
|
|
fullProfileLoadedTimestamp: property2.fullProfileLoadedTimestamp, flags: property2.flags,
|
|
collectibles: property2.collectibles, displayNameStyles: property2.displayNameStyles});
|
|
}
|
|
|
|
function processResolvedMembers(a0, a1) { // fn#21616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:9525, offset: 0x00ef5e88, size: 125 bytes, params: 3, frame: 16
|
|
var buildMembersBinding;
|
|
var object;
|
|
var Object;
|
|
const env0_0 = a0;
|
|
let r0 = a0?.members != null && a1 != null;
|
|
if (r0) {
|
|
buildMembersBinding = buildMembers;
|
|
object = {id: a1};
|
|
Object = global.Object;
|
|
object.members = Object.entries(a0.members).map(_fun21617).filter(function(a0) {
|
|
return a0 != null;
|
|
});
|
|
r0 = buildMembersBinding(object);
|
|
}
|
|
return r0;
|
|
function _fun21617(a0) { // fn#21617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:9670, offset: 0x00ef5f05, size: 133 bytes, params: 2, frame: 17
|
|
var r1;
|
|
var r2;
|
|
var r3;
|
|
var item3;
|
|
var value3;
|
|
var object;
|
|
const iterator = a0[Symbol.iterator]();
|
|
const iterator2 = iterator.next;
|
|
let item2 = Reflect.apply(iterator2, iterator, []);
|
|
let item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
const value = undefined;
|
|
const value2 = item2 === value;
|
|
const r5 = value2 ? value : item;
|
|
if (value2) {
|
|
r1 = value;
|
|
r2 = item2;
|
|
r3 = value2;
|
|
} else {
|
|
item3 = Reflect.apply(iterator2, item2, []);
|
|
item = item3.value;
|
|
item3 = item3.done ? undefined : item2;
|
|
value3 = item3 === value;
|
|
if (value3) {
|
|
r1 = value;
|
|
r2 = item3;
|
|
r3 = value3;
|
|
} else {
|
|
r1 = item;
|
|
r2 = item3;
|
|
r3 = value3;
|
|
}
|
|
}
|
|
if (!r3) {
|
|
r2.return();
|
|
}
|
|
r2 = env0_0 == null || env0_0.users == null ? value : env0_0.users[r5];
|
|
if (r2 != null) {
|
|
object = {};
|
|
copyDataProperties(object, r1, undefined);
|
|
object['user'] = r2;
|
|
return object;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
}
|
|
|
|
function processMessageResolvedMembers(a0, a1) { // fn#21619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:9784, offset: 0x00ef5f8a, size: 75 bytes, params: 3, frame: 14
|
|
const env0_0 = a0;
|
|
const env0_1 = false;
|
|
const message_snapshots = a0.message_snapshots;
|
|
if (message_snapshots != null) {
|
|
message_snapshots.forEach(_fun21620);
|
|
}
|
|
return processResolvedMembers(a0.resolved, a1) || env0_1;
|
|
function _fun21620({message}) { // fn#21620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:9888, offset: 0x00ef5fd5, size: 78 bytes, params: 2, frame: 16
|
|
let value = environment.__proto__;
|
|
const processResolvedMembersBinding = processResolvedMembers;
|
|
value = undefined;
|
|
const resolved = message == null ? value : message.resolved;
|
|
const message_reference = env0_0.message_reference;
|
|
if (processResolvedMembersBinding(resolved, message_reference == null ? value : message_reference.guild_id)) {
|
|
}
|
|
return value;
|
|
}
|
|
|
|
}
|
|
|
|
function mergeMessageResolvedMembers(a0) { // fn#21622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:10157, offset: 0x00ef6041, size: 55 bytes, params: 2, frame: 15
|
|
const channel = ChannelStore.getChannel(a0.channel_id);
|
|
const processMessageResolvedMembersBinding = processMessageResolvedMembers;
|
|
const value = undefined;
|
|
processMessageResolvedMembersBinding(a0, channel == null ? value : channel.guild_id);
|
|
return value;
|
|
}
|
|
|
|
function LOAD_MESSAGES_AROUND_SUCCESS_21623({messages}) { // fn#21623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:10289, offset: 0x00ef6078, size: 30 bytes, params: 2, frame: 11
|
|
messages.forEach(function(a0) {
|
|
mergeMessageResolvedMembers(a0);
|
|
});
|
|
function _fun21624(a0) { // fn#21624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:10342, offset: 0x00ef6096, size: 19 bytes, params: 2, frame: 11
|
|
mergeMessageResolvedMembers(a0);
|
|
}
|
|
|
|
}
|
|
|
|
function MOD_VIEW_SEARCH_MESSAGES_SUCCESS_21625({data}) { // fn#21625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:10378, offset: 0x00ef60a9, size: 56 bytes, params: 2, frame: 12
|
|
data.forEach(function({messages}) {
|
|
messages.forEach(_fun21627);
|
|
});
|
|
LOAD_MESSAGES_SUCCESS({messages: []});
|
|
function _fun21626({messages}) { // fn#21626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:10441, offset: 0x00ef60e1, size: 30 bytes, params: 2, frame: 11
|
|
messages.forEach(function(a0) {
|
|
a0.forEach(_fun21628);
|
|
});
|
|
function _fun21627(a0) { // fn#21627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:10469, offset: 0x00ef60ff, size: 24 bytes, params: 2, frame: 11
|
|
a0.forEach(_fun21628);
|
|
function _fun21628(a0) { // fn#21628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:10484, offset: 0x00ef6117, size: 24 bytes, params: 2, frame: 11
|
|
env2_0.push(a0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _fun21629(a0) { // fn#21629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:10546, offset: 0x00ef612f, size: 544 bytes, params: 2, frame: 16
|
|
const GuildMemberStore2 = GuildMemberStore;
|
|
Inherits(GuildMemberStore2, a0);
|
|
return CreateClass(GuildMemberStore2, [{key: 'initialize', value: function() {
|
|
this.waitFor(AuthenticationStore, ChannelStore, GuildRoleStore, GuildStore, ImpersonateStore);
|
|
}}, {key: 'getMutableAllGuildsAndMembers', value: value_21632}, {key: 'memberOf', value: value_21633},
|
|
{key: 'getNicknameGuildsMapping', value: value_21636}, {key: 'getNicknames', value: function(a0) {
|
|
var Object = global.Object;
|
|
return Object.keys(this.getNicknameGuildsMapping(a0));
|
|
}}, {key: 'isMember', value: value_21638}, {key: 'isGuestOrLurker', value: value_21639}, {key: 'isCurrentUserGuest',
|
|
value: value_21640}, {key: 'getMemberIds', value: value_21641}, {key: 'getMembers', value: value_21642},
|
|
{key: 'getTrueMember', value: value_21643}, {key: 'getMember', value: value_21644}, {key: 'getSelfMember',
|
|
value: value_21645}, {key: 'getSelfMemberJoinedAt', value: value_21646}, {key: 'getCachedSelfMember',
|
|
value: value_21647}, {key: 'getNick', value: function(a0, a1) {
|
|
var value = null;
|
|
if (value == a0) {
|
|
return value;
|
|
}
|
|
if (value == a1) {
|
|
return value;
|
|
}
|
|
var value2 = this.getMember(a0, a1);
|
|
return value != value2 ? value2.nick : value;
|
|
}}, {key: 'getCommunicationDisabledUserMap', value: value_21649}, {key: 'getCommunicationDisabledVersion',
|
|
value: value_21650}, {key: 'getPendingRoleUpdates', value: value_21651},
|
|
{key: 'getMemberRoleWithPendingUpdates', value: value_21652}, {key: 'getMemberVersion', value: value_21653}]);
|
|
function GuildMemberStore() { // fn#21630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:10558, offset: 0x00ef634f, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_3(this, GuildMemberStore);
|
|
const value3 = env1_6(GuildMemberStore);
|
|
return env1_5(this, _isNativeReflectConstruct_21589() ? global.Reflect.construct(value3, arguments,
|
|
env1_6(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function value_21632() { // fn#21632, offset: 0x00df0e94, size: 9 bytes, params: 1, frame: 1
|
|
return env1_16;
|
|
}
|
|
|
|
function value_21633(a0) { // fn#21633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:10980, offset: 0x00ef63eb, size: 94 bytes, params: 2, frame: 13
|
|
var environment;
|
|
const env0_0 = a0;
|
|
let value = environment.__proto__;
|
|
value = (importDefault(22) /* metro dependency 22 */)(env1_16);
|
|
value = value.toPairs();
|
|
value = value.filter(_fun21634);
|
|
value = value.map(function(a0) {
|
|
var iterator = a0[Symbol.iterator]();
|
|
var item2 = iterator.next();
|
|
var item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
var value = undefined;
|
|
var value2 = item2 === value;
|
|
var r0 = value2 ? value : item;
|
|
if (!value2) {
|
|
item2.return();
|
|
}
|
|
return r0;
|
|
});
|
|
return value.value();
|
|
function _fun21634(a0) { // fn#21634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:11029, offset: 0x00ef6449, size: 74 bytes, params: 2, frame: 6
|
|
var r0;
|
|
var r1;
|
|
var r2;
|
|
var item3;
|
|
var value3;
|
|
const iterator = a0[Symbol.iterator]();
|
|
const iterator2 = iterator.next;
|
|
let item2 = Reflect.apply(iterator2, iterator, []);
|
|
let item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
const value = undefined;
|
|
const value2 = item2 === value;
|
|
if (value2) {
|
|
r0 = item2;
|
|
r1 = value;
|
|
r2 = value2;
|
|
} else {
|
|
item3 = Reflect.apply(iterator2, item2, []);
|
|
item = item3.value;
|
|
item3 = item3.done ? undefined : item2;
|
|
value3 = item3 === value;
|
|
if (value3) {
|
|
r0 = item3;
|
|
r1 = value;
|
|
r2 = value3;
|
|
} else {
|
|
r0 = item3;
|
|
r1 = item;
|
|
r2 = value3;
|
|
}
|
|
}
|
|
if (!r2) {
|
|
r0.return();
|
|
}
|
|
return r1[env0_0] != null;
|
|
}
|
|
|
|
}
|
|
|
|
function value_21636(a0) { // fn#21636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:11115, offset: 0x00ef64b4, size: 124 bytes, params: 2, frame: 24
|
|
var r7;
|
|
var nick;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var property;
|
|
var Object;
|
|
var prototype;
|
|
var hasOwnProperty;
|
|
var call;
|
|
const object = {};
|
|
const properties = Object.keys(env1_16);
|
|
const properties2 = 0;
|
|
const properties3 = properties.length;
|
|
const value2 = undefined;
|
|
if (properties !== value2) {
|
|
r7 = properties2;
|
|
while (true) {
|
|
propertyName = properties[r7];
|
|
propertyName2 = r7 + 1;
|
|
if (propertyName === value2) {
|
|
break;
|
|
}
|
|
property = env1_16[propertyName][a0];
|
|
if (property == null) {
|
|
nick = value2;
|
|
continue;
|
|
}
|
|
nick = property.nick;
|
|
if (nick == null) {
|
|
r7 = propertyName2;
|
|
continue;
|
|
}
|
|
Object = global.Object;
|
|
prototype = Object.prototype;
|
|
hasOwnProperty = prototype.hasOwnProperty;
|
|
call = hasOwnProperty.call;
|
|
if (Reflect.apply(call, hasOwnProperty, [object, nick])) {
|
|
continue;
|
|
}
|
|
object[nick] = [];
|
|
property = object[nick];
|
|
property.push(propertyName);
|
|
r7 = propertyName2;
|
|
}
|
|
}
|
|
return object;
|
|
}
|
|
|
|
function value_21638(a0, a1) { // fn#21638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:11395, offset: 0x00ef6557, size: 48 bytes, params: 3, frame: 5
|
|
if (a0 == null) {
|
|
return false;
|
|
}
|
|
if (a1 == null) {
|
|
return false;
|
|
}
|
|
const value = environment.__proto__;
|
|
const property = env1_16[a0];
|
|
return property != null && property[a1] != null;
|
|
}
|
|
|
|
function value_21639(a0, a1) { // fn#21639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:11507, offset: 0x00ef6587, size: 63 bytes, params: 3, frame: 5
|
|
var r0;
|
|
if (a0 == null) {
|
|
return false;
|
|
}
|
|
if (a1 == null) {
|
|
return false;
|
|
}
|
|
let value = environment.__proto__;
|
|
let property = env1_16[a0];
|
|
value = property != null;
|
|
if (value) {
|
|
property = property[a1];
|
|
value = undefined;
|
|
value = (property == null ? value : property.joinedAt) == null;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_21640(a0) { // fn#21640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:11658, offset: 0x00ef65c6, size: 116 bytes, params: 2, frame: 15
|
|
var r0;
|
|
var moduleValue;
|
|
if (a0 == null) {
|
|
return false;
|
|
}
|
|
const value = environment.__proto__;
|
|
const id = AuthenticationStore.getId();
|
|
const property = env1_16[a0];
|
|
if (property == null) {
|
|
return false;
|
|
}
|
|
if (property[id] == null) {
|
|
return false;
|
|
}
|
|
const flags = property[id].flags;
|
|
const value3 = flags != null;
|
|
if (value3) {
|
|
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
|
|
r0 = moduleValue.hasFlag(flags, GuildMemberFlags.IS_GUEST);
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_21641(a0) { // fn#21641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:11838, offset: 0x00ef663a, size: 70 bytes, params: 2, frame: 12
|
|
var r0;
|
|
if (a0 == null) {
|
|
return [];
|
|
}
|
|
let value = environment.__proto__;
|
|
const property = env1_16[a0];
|
|
if (property == null) {
|
|
r0 = [];
|
|
} else {
|
|
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
value = value.keys(property);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_21642(a0) { // fn#21642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:11942, offset: 0x00ef6680, size: 56 bytes, params: 2, frame: 11
|
|
if (a0 == null) {
|
|
return [];
|
|
}
|
|
const value = environment.__proto__;
|
|
const property = env1_16[a0];
|
|
return property == null ? [] : global.Object.values(property);
|
|
}
|
|
|
|
function value_21643(a0, a1) { // fn#21643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:12049, offset: 0x00ef66b8, size: 32 bytes, params: 3, frame: 3
|
|
let value = environment.__proto__;
|
|
const property = env1_16[a0];
|
|
value = null;
|
|
return value != property ? property[a1] : value;
|
|
}
|
|
|
|
function value_21644(a0, a1) { // fn#21644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:12124, offset: 0x00ef66d8, size: 113 bytes, params: 3, frame: 17
|
|
const trueMember = this.getTrueMember(a0, a1);
|
|
return trueMember == null || a1 !== AuthenticationStore.getId() ? trueMember : ImpersonateStore.isViewingRoles(a0) || ImpersonateStore.isFullServerPreview(a0) ? env1_18[a0] ?? trueMember : trueMember;
|
|
}
|
|
|
|
function value_21645(a0) { // fn#21645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:12298, offset: 0x00ef6749, size: 37 bytes, params: 2, frame: 13
|
|
const getMember = this.getMember;
|
|
const value = environment.__proto__;
|
|
return Reflect.apply(getMember, this, [a0, AuthenticationStore.getId()]);
|
|
}
|
|
|
|
function value_21646(a0) { // fn#21646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:12382, offset: 0x00ef676e, size: 96 bytes, params: 2, frame: 15
|
|
const property = env1_17[a0];
|
|
if (property != null) {
|
|
return property;
|
|
}
|
|
const selfMember = this.getSelfMember(a0);
|
|
if (selfMember == null) {
|
|
return null;
|
|
}
|
|
if (selfMember.joinedAt == null) {
|
|
return null;
|
|
}
|
|
const Date = global.Date;
|
|
const date = new Date(selfMember.joinedAt);
|
|
env1_17[a0] = date;
|
|
return date;
|
|
}
|
|
|
|
function value_21647(a0) { // fn#21647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:12572, offset: 0x00ef67ce, size: 28 bytes, params: 2, frame: 3
|
|
let value = environment.__proto__;
|
|
const property = env1_19[a0];
|
|
value = null;
|
|
return value != property ? property : value;
|
|
}
|
|
|
|
function value_21649() { // fn#21649, offset: 0x00e4253a, size: 9 bytes, params: 1, frame: 1
|
|
return env1_20;
|
|
}
|
|
|
|
function value_21650() { // fn#21650, offset: 0x00e425c8, size: 9 bytes, params: 1, frame: 1
|
|
return env1_22;
|
|
}
|
|
|
|
function value_21651(a0) { // fn#21651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:12912, offset: 0x00ef681c, size: 26 bytes, params: 2, frame: 3
|
|
return env1_25[a0] ?? env1_26;
|
|
}
|
|
|
|
function value_21652(a0, a1) { // fn#21652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:13003, offset: 0x00ef6836, size: 133 bytes, params: 3, frame: 18
|
|
var r0;
|
|
var difference;
|
|
var defaultImport;
|
|
const r7 = this.getMember(a0, a1)?.roles ?? [];
|
|
value = environment.__proto__;
|
|
const property = env1_25[a0];
|
|
if (property == null) {
|
|
r0 = r7;
|
|
} else {
|
|
value = importDefault(22) /* metro dependency 22 */;
|
|
difference = value.difference;
|
|
defaultImport = importDefault(22) /* metro dependency 22 */;
|
|
value = Reflect.apply(difference, value, [defaultImport.union(r7, property.added), property.removed]);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_21653() { // fn#21653, offset: 0x00df3ac4, size: 9 bytes, params: 1, frame: 1
|
|
return env1_23;
|
|
}
|
|
|
|
}
|
|
|
|
function CONNECTION_OPEN_21654(a0) { // fn#21654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:13312, offset: 0x00ef68bb, size: 55 bytes, params: 2, frame: 11
|
|
if (!env0_21) {
|
|
env0_16 = {};
|
|
env0_17 = {};
|
|
}
|
|
env0_20 = {};
|
|
(({guilds}) => {
|
|
guilds.forEach(_fun21656);
|
|
})(a0);
|
|
function mergeGuildMembers({guilds}) { // fn#21655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:13369, owner: CONNECTION_OPEN_21654.mergeGuildMembers, offset: 0x00ef68f2, size: 30 bytes, params: 2, frame: 11
|
|
guilds.forEach(function(a0) {
|
|
buildMembers(a0);
|
|
});
|
|
function _fun21656(a0) { // fn#21656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:13417, offset: 0x00ef6910, size: 19 bytes, params: 2, frame: 11
|
|
buildMembers(a0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function CONNECTION_OPEN_SUPPLEMENTAL_21657({guilds}) { // fn#21657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:13474, offset: 0x00ef6923, size: 30 bytes, params: 2, frame: 11
|
|
guilds.forEach(function(a0) {
|
|
var property = a0.id;
|
|
var env0_0 = property;
|
|
buildMembers({id: property, members: a0.members});
|
|
property = a0.activity_instances;
|
|
if (property != null) {
|
|
property.forEach(_fun21659);
|
|
}
|
|
});
|
|
function _fun21658({id, members, activity_instances}) { // fn#21658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:13537, offset: 0x00ef6941, size: 74 bytes, params: 2, frame: 14
|
|
buildMembers({id: id, members: members});
|
|
if (activity_instances != null) {
|
|
activity_instances.forEach(function(a0) {
|
|
buildMembersFromActivityParticipants(id, a0.participants);
|
|
});
|
|
}
|
|
function _fun21659({participants}) { // fn#21659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:13640, offset: 0x00ef698b, size: 33 bytes, params: 2, frame: 13
|
|
buildMembersFromActivityParticipants(id, participants);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function GUILD_DELETE_21664({guild}) { // fn#21664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:14070, offset: 0x00ef6a3e, size: 55 bytes, params: 2, frame: 12
|
|
delete env0_16[guild.id];
|
|
delete env0_17[guild.id];
|
|
removeCommunicationDisabled(guild.id);
|
|
}
|
|
|
|
function GUILD_MEMBER_UPDATE_LOCAL_21665({guildId, roles, addedRoleIds, removedRoleIds, flags}) { // fn#21665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:14284, offset: 0x00ef6a75, size: 471 bytes, params: 2, frame: 31
|
|
const id = AuthenticationStore.getId();
|
|
const property = env0_16[guildId];
|
|
const r5 = property != null ? property[id] : null;
|
|
if (r5 == null) {
|
|
return false;
|
|
}
|
|
const guild = GuildStore.getGuild(guildId);
|
|
if (guild == null) {
|
|
return false;
|
|
}
|
|
const r13 = env0_25[guildId] ?? ({});
|
|
const binding = env0_25;
|
|
const object = {};
|
|
const defaultImport = Module00022;
|
|
let difference = defaultImport.difference;
|
|
const defaultImport2 = defaultImport;
|
|
object.added = Reflect.apply(difference, defaultImport, [defaultImport2.union(r13.added ?? [], addedRoleIds),
|
|
removedRoleIds ?? []]);
|
|
const defaultImport3 = defaultImport;
|
|
difference = defaultImport3.difference;
|
|
const defaultImport4 = defaultImport;
|
|
object.removed = Reflect.apply(difference, defaultImport3, [defaultImport4.union(r13.removed ?? [], removedRoleIds),
|
|
addedRoleIds ?? []]);
|
|
binding[guildId] = object;
|
|
const createMemberBinding = createMember;
|
|
const guildRoleStoreBinding = GuildRoleStore;
|
|
const getUnsafeMutableRoles = guildRoleStoreBinding.getUnsafeMutableRoles;
|
|
roles = roles ?? r5.roles;
|
|
flags = flags ?? r5.flags;
|
|
property[id] = createMemberBinding({userId: id, guildId: guildId, nick: r5.nick, avatar: r5.avatar,
|
|
avatarDecoration: r5.avatarDecoration, guildRoles: Reflect.apply(getUnsafeMutableRoles, guildRoleStoreBinding,
|
|
[guild.id]), roles: roles, premiumSince: r5.premiumSince, isPending: r5.isPending, joinedAt: r5.joinedAt,
|
|
flags: flags, fullProfileLoadedTimestamp: r5.fullProfileLoadedTimestamp, collectibles: r5.collectibles,
|
|
displayNameStyles: r5.displayNameStyles});
|
|
}
|
|
|
|
function THREAD_MEMBER_LIST_UPDATE({guildId, members}) { // fn#21669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:15539, offset: 0x00ef6cee, size: 84 bytes, params: 2, frame: 16
|
|
const batchUpdateGuildMembersBinding = batchUpdateGuildMembers;
|
|
const value2 = members.map(function(a0) {
|
|
return a0.member;
|
|
});
|
|
return batchUpdateGuildMembersBinding(guildId,
|
|
value2.filter((GlobalUtilsModule).isNotNullish));
|
|
}
|
|
|
|
function THREAD_MEMBERS_UPDATE({guildId, addedMembers}) { // fn#21671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:15709, offset: 0x00ef6d42, size: 93 bytes, params: 2, frame: 17
|
|
var r0;
|
|
var batchUpdateGuildMembersBinding;
|
|
var value2;
|
|
const value = addedMembers != null;
|
|
if (value) {
|
|
batchUpdateGuildMembersBinding = batchUpdateGuildMembers;
|
|
value2 = addedMembers.map(function(a0) {
|
|
return a0.member;
|
|
});
|
|
r0 = batchUpdateGuildMembersBinding(guildId,
|
|
value2.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish));
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function LOAD_FORUM_POSTS({guildId, threads}) { // fn#21674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:16016, offset: 0x00ef6dbe, size: 72 bytes, params: 2, frame: 15
|
|
const batchUpdateGuildMembersBinding = batchUpdateGuildMembers;
|
|
const Object = global.Object;
|
|
let value = Object.values(threads);
|
|
value = value.reduce(_fun21675, []);
|
|
return batchUpdateGuildMembersBinding(guildId, value);
|
|
}
|
|
|
|
function GUILD_ROLE_MEMBER_REMOVE({guildId, userId, roleId}) { // fn#21676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:16645, offset: 0x00ef6ebc, size: 250 bytes, params: 2, frame: 19
|
|
var computeDerivedMemberStateBinding;
|
|
var guildRoleStoreBinding;
|
|
var object;
|
|
var value;
|
|
const property = env0_16[guildId];
|
|
if (property != null) {
|
|
var guild = GuildStore.getGuild(guildId);
|
|
if (guild == null) {
|
|
env0_15.warn('Guild ' + guildId + ' not found during GUILD_MEMBER_UPDATE.');
|
|
return false;
|
|
}
|
|
var property2 = property[userId];
|
|
if (property2 == null) {
|
|
return false;
|
|
}
|
|
var roles = property2.roles;
|
|
if (roles.includes(roleId)) {
|
|
roles = property2.roles;
|
|
property2.roles = roles.filter(function(a0) {
|
|
return a0 !== roleId;
|
|
});
|
|
computeDerivedMemberStateBinding = computeDerivedMemberState;
|
|
guildRoleStoreBinding = GuildRoleStore;
|
|
value = guildRoleStoreBinding.getUnsafeMutableRoles(guild.id);
|
|
roles = property2.roles;
|
|
value = computeDerivedMemberStateBinding(value, roles);
|
|
object = {};
|
|
copyDataProperties(object, property2, roleId);
|
|
copyDataProperties(object, value, roleId);
|
|
property[userId] = object;
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function GUILD_ROLE_MEMBER_ADD({guildId, userId, roleId}) { // fn#21678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:17064, offset: 0x00ef6fb6, size: 257 bytes, params: 2, frame: 20
|
|
const property = env0_16[guildId];
|
|
if (property == null) {
|
|
return false;
|
|
}
|
|
const guild = GuildStore.getGuild(guildId);
|
|
if (guild == null) {
|
|
env0_15.warn('Guild ' + guildId + ' not found during GUILD_MEMBER_UPDATE.');
|
|
return false;
|
|
}
|
|
const property2 = property[userId];
|
|
if (property2 == null) {
|
|
return false;
|
|
}
|
|
let roles = property2.roles;
|
|
if (roles.includes(roleId)) {
|
|
return false;
|
|
}
|
|
roles = property2.roles;
|
|
let object = [];
|
|
const value3 = arraySpread(object, roles, 0, undefined);
|
|
object[value3] = roleId;
|
|
value3 + 1;
|
|
property2.roles = object;
|
|
const computeDerivedMemberStateBinding = computeDerivedMemberState;
|
|
let value = GuildRoleStore.getUnsafeMutableRoles(guild.id);
|
|
value = computeDerivedMemberStateBinding(value, property2.roles);
|
|
object = {};
|
|
copyDataProperties(object, property2, 0);
|
|
copyDataProperties(object, value, 0);
|
|
property[userId] = object;
|
|
return true;
|
|
}
|
|
|
|
function GUILD_MEMBER_PROFILE_UPDATE({guildMember, guildId}) { // fn#21679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:17473, offset: 0x00ef70b7, size: 414 bytes, params: 2, frame: 22
|
|
const property = env0_16[guildId];
|
|
if (property == null) {
|
|
return false;
|
|
}
|
|
const guild = GuildStore.getGuild(guildId);
|
|
if (guild == null) {
|
|
env0_15.warn('Guild ' + guildId + ' not found during GUILD_MEMBER_UPDATE.');
|
|
return false;
|
|
}
|
|
let user = guildMember.user;
|
|
const id = user.id;
|
|
const createMemberBinding = createMember;
|
|
const object = {};
|
|
user = guildMember.user;
|
|
object.userId = user.id;
|
|
object.nick = guildMember.nick;
|
|
object.guildId = guildId;
|
|
object.avatar = guildMember.avatar;
|
|
object.avatarDecoration = getAvatarDecorationFromServerMember(guildMember);
|
|
object.guildRoles = GuildRoleStore.getUnsafeMutableRoles(guild.id);
|
|
object.roles = guildMember.roles;
|
|
object.premiumSince = guildMember.premium_since;
|
|
object.isPending = guildMember.pending;
|
|
object.joinedAt = guildMember.joined_at;
|
|
object.communicationDisabledUntil = guildMember.communication_disabled_until;
|
|
object.unusualDMActivityUntil = guildMember.unusual_dm_activity_until;
|
|
object.flags = guildMember.flags;
|
|
const Date = global.Date;
|
|
object.fullProfileLoadedTimestamp = Date.now();
|
|
object.collectibles = MappersModule.parseServerUserCollectibles(guildMember.collectibles);
|
|
object.displayNameStyles = DisplayNameStylesUtilsModule.parseServerDisplayNameStyles(guildMember.display_name_styles);
|
|
property[id] = createMemberBinding(object);
|
|
const trackCommunicationDisabledBinding = trackCommunicationDisabled;
|
|
user = guildMember.user;
|
|
trackCommunicationDisabledBinding(guildId, property[user.id]);
|
|
}
|
|
|
|
function PASSIVE_UPDATE_V2(a0) { // fn#21680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:18390, offset: 0x00ef7255, size: 51 bytes, params: 2, frame: 14
|
|
return a0.members.length > 0 && batchUpdateGuildMembers(a0.guildId, a0.members);
|
|
}
|
|
|
|
function CLEAR_PENDING_CHANNEL_AND_ROLE_UPDATES({guildId}) { // fn#21681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:18536, offset: 0x00ef7288, size: 33 bytes, params: 2, frame: 2
|
|
if (guildId == null) {
|
|
return false;
|
|
}
|
|
delete env0_25[guildId];
|
|
}
|
|
|
|
function LOCAL_MESSAGES_LOADED(a0) { // fn#21682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:18639, offset: 0x00ef72a9, size: 233 bytes, params: 2, frame: 20
|
|
var r2;
|
|
var r3;
|
|
var value6;
|
|
var userId;
|
|
var value7;
|
|
let guildId = a0.guildId;
|
|
if (guildId == null) {
|
|
return false;
|
|
}
|
|
const guildStoreBinding = GuildStore;
|
|
const getGuild = guildStoreBinding.getGuild;
|
|
if (Reflect.apply(getGuild, guildStoreBinding, [a0.guildId]) == null) {
|
|
return false;
|
|
}
|
|
const value2 = true;
|
|
let binding = env0_16;
|
|
guildId = a0.guildId;
|
|
let property = env0_16[a0.guildId];
|
|
let r0 = property ?? ({});
|
|
binding[guildId] = r0;
|
|
env0_16[a0.guildId] = env0_16[a0.guildId] ?? ({});
|
|
const value3 = _createForOfIteratorHelperLoose_21592(a0.members);
|
|
const value4 = value3();
|
|
let done = value4.done;
|
|
const value5 = false;
|
|
if (done) {
|
|
r0 = value5;
|
|
} else {
|
|
r2 = value4;
|
|
r3 = value5;
|
|
while (true) {
|
|
value6 = r2.value;
|
|
binding = env0_16;
|
|
guildId = a0.guildId;
|
|
property = binding[guildId];
|
|
userId = value6.userId;
|
|
if (property[userId] == null) {
|
|
binding = env0_16;
|
|
guildId = a0.guildId;
|
|
property = binding[guildId];
|
|
userId = value6.userId;
|
|
property[userId] = value6;
|
|
r3 = value2;
|
|
}
|
|
value7 = value3();
|
|
done = value7.done;
|
|
if (done) {
|
|
r0 = r3;
|
|
break;
|
|
}
|
|
r2 = value7;
|
|
continue;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function LOAD_PINNED_MESSAGES_SUCCESS({pins}) { // fn#21683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:19240, offset: 0x00ef7392, size: 30 bytes, params: 2, frame: 11
|
|
pins.forEach(function({message}) {
|
|
mergeMessageResolvedMembers(message);
|
|
});
|
|
function _fun21684({message}) { // fn#21684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:19295, offset: 0x00ef73b0, size: 24 bytes, params: 2, frame: 11
|
|
mergeMessageResolvedMembers(message);
|
|
}
|
|
|
|
}
|
|
|
|
function MEMBER_SAFETY_GUILD_MEMBER_SEARCH_SUCCESS({guildId, members}) { // fn#21685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:19491, offset: 0x00ef73c8, size: 48 bytes, params: 2, frame: 14
|
|
return batchUpdateGuildMembers(guildId, members.map(function(a0) {
|
|
return a0.member;
|
|
}));
|
|
}
|
|
|
|
function EMBEDDED_ACTIVITY_UPDATE_V2_21687({location, participants}) { // fn#21687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:19655, offset: 0x00ef73f8, size: 71 bytes, params: 2, frame: 15
|
|
const embeddedActivityLocationGuildId = (EmbeddedActivityLocationUtilsModule).getEmbeddedActivityLocationGuildId(location);
|
|
return embeddedActivityLocationGuildId != null && buildMembersFromActivityParticipants(embeddedActivityLocationGuildId,
|
|
participants);
|
|
}
|
|
|
|
function INTERACTION_MODAL_CREATE({channelId, resolved}) { // fn#21688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:19862, offset: 0x00ef743f, size: 61 bytes, params: 2, frame: 15
|
|
return processResolvedMembers(resolved, ChannelStore.getChannel(channelId)?.guild_id);
|
|
}
|
|
|
|
function getUserCommunicationDisabledVersion(a0, a1) { // fn#21689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:20121, offset: 0x00ef747c, size: 48 bytes, params: 3, frame: 14
|
|
const communicationDisabledUserKey = getCommunicationDisabledUserKey(a0, a1);
|
|
return communicationDisabledUserKey in env0_24 ? env0_24[communicationDisabledUserKey] : -1;
|
|
}
|
|
|
|
}
|
|
|
|
function _fun21670(a0) { // fn#21670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:15640, offset: 0x00ef597f, size: 11 bytes, params: 2, frame: 1
|
|
return a0.member;
|
|
}
|
|
|
|
function _fun21675(a0, a1) { // fn#21675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2072:16127, offset: 0x00ef6e06, size: 182 bytes, params: 3, frame: 15
|
|
var property;
|
|
var moderator_report;
|
|
if (a1.owner != null) {
|
|
a0.push(a1.owner);
|
|
}
|
|
const value = undefined;
|
|
if ((a1 == null || a1.first_message == null ? value : a1.first_message.message_snapshots) != null) {
|
|
property = a1.first_message.message_snapshots[0];
|
|
moderator_report = property.moderator_report;
|
|
if ((moderator_report == null ? value : moderator_report.reported_member) != null) {
|
|
a0.push(property.moderator_report.reported_member);
|
|
}
|
|
moderator_report = property.moderator_report;
|
|
if ((moderator_report == null ? value : moderator_report.reporting_member) != null) {
|
|
a0.push(property.moderator_report.reporting_member);
|
|
}
|
|
}
|
|
return a0;
|
|
}
|
|
|
|
global.__d(_fun21588, 1945, [6, 7, 15, 17, 18, 1946, 1937, 1226, 1379, 1938, 1867, 3772, 3, 3773, 1940, 1391, 21,
|
|
1857, 1858, 1888, 1360, 1908, 22, 3774, 566, 694,
|
|
2]) /* metro module 1945, dependencies: [6, 7, 15, 17, 18, 1946, 1937, 1226, 1379, 1938, 1867, 3772, 3, 3773, 1940, 1391, 21, 1857, 1858, 1888, 1360, 1908, 22, 3774, 566, 694, 2] */;
|