1871 lines
76 KiB
TypeScript
1871 lines
76 KiB
TypeScript
/* Metro module 1878; source: stores/UserStore.tsx; dependencies: [6, 7, 15, 17, 18, 1879, 1885, 1226, 1228, 661, 1880, 1887, 1883, 1857, 1858, 1888, 1892, 1898, 1391, 22, 1908, 1909, 1360, 2] */
|
|
function _fun20276(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:6, offset: 0x00ec35a7, size: 1028 bytes, params: 8, frame: 22
|
|
let env0_0 = require;
|
|
const _arrayLikeToArray_20282 = 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 = transformUser;
|
|
const isNotCurrentUser = function({id}) {
|
|
return id !== AuthenticationStore.getId();
|
|
};
|
|
const closure2 = mergeUser;
|
|
const processResolvedUsers = function(a0, a1) {
|
|
var r4;
|
|
var users;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var property;
|
|
var value = undefined;
|
|
if ((a0 == null ? value : a0.users) == null) {
|
|
return false;
|
|
}
|
|
users = a0.users;
|
|
for (propertyName in users) {
|
|
property = a0.users[propertyName];
|
|
if (!isNotCurrentUser(property)) {
|
|
r4 = propertyName2;
|
|
continue;
|
|
}
|
|
mergeUser(property, a1);
|
|
r4 = propertyName2;
|
|
}
|
|
return value;
|
|
};
|
|
const handleConnectionOpenSupplemental = function({guilds, lazyPrivateChannels}) {
|
|
guilds.forEach(_fun20301);
|
|
if (lazyPrivateChannels != null) {
|
|
lazyPrivateChannels.forEach(_fun20303);
|
|
}
|
|
};
|
|
const isIncompleteUser = function(a0) {
|
|
return !('incomplete' in a0);
|
|
};
|
|
const handleUserUpdate = function({user}) {
|
|
if (isNotCurrentUser(user)) {
|
|
mergeUser(user);
|
|
return undefined;
|
|
}
|
|
return false;
|
|
};
|
|
const handleRestrictedScheduleUpdate = function({userId, restrictedSchedule}) {
|
|
return mergeUser({id: userId, restricted_schedule: restrictedSchedule});
|
|
};
|
|
const handleUserProfileFetchSuccess = function({userProfile}) {
|
|
if (isNotCurrentUser(userProfile.user)) {
|
|
mergeUser(userProfile.user);
|
|
return undefined;
|
|
}
|
|
return false;
|
|
};
|
|
const handleCurrentUserUpdate = function({user}) {
|
|
mergeUser(user);
|
|
};
|
|
const updatePremiumType = function({user}) {
|
|
mergeUser({id: user.id, premiumType: user.premiumType}, true);
|
|
};
|
|
const handleLoadMessages = function({messages}) {
|
|
messages.forEach(_fun20313);
|
|
return false;
|
|
};
|
|
const handleLoadConversationMessages = function({messages}) {
|
|
messages.forEach(_fun20315);
|
|
return false;
|
|
};
|
|
const handleLoadPinnedMessages = function({pins}) {
|
|
pins.forEach(_fun20317);
|
|
return false;
|
|
};
|
|
const handleThreadListSync = function({mostRecentMessages}) {
|
|
if (mostRecentMessages != null) {
|
|
mostRecentMessages.forEach(_fun20319);
|
|
}
|
|
return false;
|
|
};
|
|
const handleLoadSearchResults = function({data}) {
|
|
data.forEach(_fun20321);
|
|
return false;
|
|
};
|
|
const handleLoadThreadsSuccess = function({firstMessages, owners}) {
|
|
if (firstMessages != null) {
|
|
firstMessages.forEach(_fun20327);
|
|
}
|
|
if (owners != null) {
|
|
owners.forEach(_fun20328);
|
|
}
|
|
};
|
|
const handleLoadForumPosts = function({threads}) {
|
|
var Object = global.Object;
|
|
Object.values(threads).forEach(_fun20330);
|
|
};
|
|
const handleLoadMessageRequestsSupplementalDataSuccess = function({supplementalData}) {
|
|
var Object = global.Object;
|
|
Object.values(supplementalData).forEach(_fun20332);
|
|
};
|
|
const handleFetchUsersForGuildEventSuccess = function({guildScheduledEventUsers, guildId}) {
|
|
guildScheduledEventUsers.forEach(_fun20334);
|
|
};
|
|
const handleLoadNotificationCenterItems = function({items}) {
|
|
items.forEach(_fun20336);
|
|
};
|
|
const handleCreateChannel = function(a0) {
|
|
var rawRecipients = a0.channel.rawRecipients;
|
|
if (rawRecipients != null) {
|
|
rawRecipients.forEach(_fun20340);
|
|
}
|
|
return false;
|
|
};
|
|
const handlePresenceUpdates = function({updates}) {
|
|
return updates.map(_fun20344).some(_fun20346);
|
|
};
|
|
const handleLoadedBans = function({bans}) {
|
|
bans.forEach(_fun20348);
|
|
};
|
|
const handleLoadedBansBatch = function({bans}) {
|
|
bans.forEach(_fun20350);
|
|
};
|
|
const handleBan = function(a0) {
|
|
return mergeUser(a0.user);
|
|
};
|
|
const handlePassiveUpdateV2 = function(a0) {
|
|
var r2;
|
|
var r3;
|
|
var r0;
|
|
var value5;
|
|
var value6;
|
|
var mergeGuildAvatarBinding;
|
|
var id;
|
|
var guildId;
|
|
var value7;
|
|
var value8;
|
|
var value2 = _createForOfIteratorHelperLoose_20280(a0.members);
|
|
var value3 = value2();
|
|
var value4 = false;
|
|
if (value3.done) {
|
|
r0 = value4;
|
|
} else {
|
|
r2 = value4;
|
|
r3 = value3;
|
|
while (true) {
|
|
value5 = r3.value;
|
|
value6 = mergeUser(value5.user) || value6;
|
|
mergeGuildAvatarBinding = mergeGuildAvatar;
|
|
id = value5.user.id;
|
|
guildId = a0.guildId;
|
|
if (!mergeGuildAvatarBinding(id, guildId, value5.avatar)) {
|
|
continue;
|
|
}
|
|
value7 = true;
|
|
r2 = value7;
|
|
value8 = value2();
|
|
if (value8.done) {
|
|
r0 = r2;
|
|
break;
|
|
}
|
|
r3 = value8;
|
|
continue;
|
|
}
|
|
}
|
|
return r0;
|
|
};
|
|
const handleGuildCreate = function({guild}) {
|
|
var env0_0 = guild;
|
|
guild = guild.members;
|
|
guild.forEach(_fun20365);
|
|
};
|
|
const handleRelationshipAdd = function(a0) {
|
|
return mergeUser(a0.relationship.user);
|
|
};
|
|
const handleGameRelationshipAdd = function(a0) {
|
|
return mergeUser(a0.gameRelationship.user);
|
|
};
|
|
const handleLoadRelationships = function({relationships}) {
|
|
return relationships.reduce(_fun20369, false);
|
|
};
|
|
const handleFriendSuggestionCreate = function(a0) {
|
|
return mergeUser(a0.suggestion.suggested_user);
|
|
};
|
|
const handleLoadFriendSuggestions = function({suggestions}) {
|
|
return suggestions.reduce(_fun20372, false);
|
|
};
|
|
const handleAuditLogFetched = function({users}) {
|
|
users.forEach(_fun20374);
|
|
};
|
|
const handleGuildPremiumSubscriptionsFetchSuccess = function({appliedBoosts}) {
|
|
appliedBoosts.forEach(_fun20377);
|
|
};
|
|
const handleInitialFamilyCenterLoad = function({users, familyCenterTeenActivity}) {
|
|
var items = [];
|
|
arraySpread(items, familyCenterTeenActivity.users, arraySpread(items, users, 0, items), items);
|
|
return items.reduce(_fun20380, false);
|
|
};
|
|
const handleLinkedUserFetch = function({users}) {
|
|
return users.reduce(_fun20382, false);
|
|
};
|
|
const handleRequestLinkSuccess = function({users}) {
|
|
return users.reduce(_fun20384, false);
|
|
};
|
|
const handleTeenActivityFetch = function({familyCenterTeenActivity}) {
|
|
if (familyCenterTeenActivity !== undefined) {
|
|
familyCenterTeenActivity = familyCenterTeenActivity.users;
|
|
return familyCenterTeenActivity.reduce(_fun20386, false);
|
|
}
|
|
};
|
|
const handleTeenActivityMoreFetch = function(a0) {
|
|
var users = a0.familyCenterTeenActivity.users;
|
|
return users.reduce(_fun20388, false);
|
|
};
|
|
const handleMemberSafetyGuildMemberSearchSuccess = function({members}) {
|
|
var env0_0 = AuthenticationStore.getId();
|
|
return members.reduce(_fun20390, false);
|
|
};
|
|
const handleLoadICYMIHydratedItems = function({messageItems}) {
|
|
messageItems.forEach(_fun20392, false);
|
|
};
|
|
const handleEmbeddedActivityUpdateV2 = function({participants}) {
|
|
return participants.reduce(_fun20394, false);
|
|
};
|
|
const handleInteractionModalCreate = function({resolved}) {
|
|
return processResolvedUsers(resolved, true);
|
|
};
|
|
const handleGuildStickersFetchSuccess = function({stickers}) {
|
|
return stickers.reduce(_fun20399, false);
|
|
};
|
|
let Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_5 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_6 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_7 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_8 = importDefault(18) /* metro dependency 18 */;
|
|
const overridePremiumTypeStore = importDefault(1879) /* metro dependency 1879: OverridePremiumTypeStore */;
|
|
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
|
|
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
|
let value = importDefault(1228) /* metro dependency 1228: MobileCacheSnapshotStore */;
|
|
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
|
const env0_12 = constantsModule.UserFlags;
|
|
const env0_13 = constantsModule.MessageFlags;
|
|
const env0_14 = constantsModule.ChannelTypes;
|
|
const env0_15 = (require(1880) /* metro dependency 1880: PremiumConstants */).UNSELECTED_PREMIUM_TYPE_OVERRIDE;
|
|
const env0_19 = ['username', 'avatar', 'global_name', 'discriminator', 'bot', 'primary_guild'];
|
|
value = _fun20400(value);
|
|
value.displayName = 'UserStore';
|
|
value.LATEST_SNAPSHOT_VERSION = 1;
|
|
value = new value();
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/UserStore.tsx');
|
|
exports.default = value;
|
|
exports.users = {};
|
|
exports.ASSISTANT_WUMPUS_VOICE_USER = '47835198259242069';
|
|
exports.transformUser = closure;
|
|
exports.mergeUser = closure2;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_20277() { // fn#20277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:294, offset: 0x00ec39ab, 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_20277_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _createForOfIteratorHelperLoose_20280(a0, a1) { // fn#20280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:487, offset: 0x00ec3a09, 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 _fun20281;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_20282(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_20282(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_20282(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun20281;
|
|
}
|
|
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 mergeGuildAvatar(a0, a1, a2) { // fn#20283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:1432, offset: 0x00ec3b7b, size: 96 bytes, params: 4, frame: 15
|
|
const property = env0_16[a0];
|
|
if (property == null) {
|
|
return false;
|
|
}
|
|
const r0 = a2 == null ? property.removeGuildAvatarHash(a1) : property.addGuildAvatarHash(a1, a2);
|
|
let binding = env0_16;
|
|
binding[property.id] = r0;
|
|
const value4 = property !== r0;
|
|
if (value4) {
|
|
binding = env0_17;
|
|
env0_17 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
|
}
|
|
return value4;
|
|
}
|
|
|
|
function mergeUserPrimaryGuild(a0, a1) { // fn#20284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:1605, offset: 0x00ec3bdb, size: 181 bytes, params: 3, frame: 20
|
|
var r2;
|
|
var r1;
|
|
var r0;
|
|
var moduleValue;
|
|
var isUserPrimaryGuildEqual2;
|
|
var moduleValue2;
|
|
var binding;
|
|
const property = env0_16[a0];
|
|
const value2 = property != null;
|
|
if (value2) {
|
|
moduleValue = require(1887) /* metro dependency 1887: PrimaryGuildUtils */;
|
|
isUserPrimaryGuildEqual2 = moduleValue.isUserPrimaryGuildEqual(property.primaryGuild, a1.primary_guild);
|
|
if (isUserPrimaryGuildEqual2) {
|
|
r1 = !isUserPrimaryGuildEqual2;
|
|
} else {
|
|
r2 = property.primaryGuild == null || a1.primary_guild != null;
|
|
if (r2) {
|
|
moduleValue2 = require(1887) /* metro dependency 1887: PrimaryGuildUtils */;
|
|
property.primaryGuild = moduleValue2.ensureUserPrimaryGuild(a1.primary_guild);
|
|
binding = env0_16;
|
|
binding[property.id] = property;
|
|
binding = env0_17;
|
|
env0_17 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
|
r2 = true;
|
|
}
|
|
r1 = r2;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function transformUser(a0) { // fn#20285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:1871, offset: 0x00ec3c90, size: 572 bytes, params: 2, frame: 16
|
|
var moduleValue2;
|
|
var moduleValue3;
|
|
var moduleValue4;
|
|
var moduleValue5;
|
|
var moduleValue6;
|
|
var value4;
|
|
const mfa_enabled = a0.mfa_enabled;
|
|
const value = null;
|
|
if (value != mfa_enabled) {
|
|
a0.mfaEnabled = mfa_enabled;
|
|
delete a0.mfa_enabled;
|
|
}
|
|
const premiumTypeFromRawValue = (require(1883) /* metro dependency 1883: UserStoreUtils */).getPremiumTypeFromRawValue(a0.premium_type);
|
|
if (premiumTypeFromRawValue !== undefined) {
|
|
a0.premiumType = premiumTypeFromRawValue;
|
|
delete a0.premium_type;
|
|
}
|
|
const nsfw_allowed = a0.nsfw_allowed;
|
|
if (value != nsfw_allowed) {
|
|
a0.nsfwAllowed = nsfw_allowed;
|
|
delete a0.nsfw_allowed;
|
|
}
|
|
const age_verification_status = a0.age_verification_status;
|
|
if (value != age_verification_status) {
|
|
a0.ageVerificationStatus = age_verification_status;
|
|
delete a0.age_verification_status;
|
|
}
|
|
const public_flags = a0.public_flags;
|
|
if (value != public_flags) {
|
|
a0.publicFlags = public_flags;
|
|
delete a0.public_flags;
|
|
}
|
|
const purchased_flags = a0.purchased_flags;
|
|
if (purchased_flags !== undefined) {
|
|
a0.purchasedFlags = purchased_flags;
|
|
delete a0.purchased_flags;
|
|
}
|
|
const premium_usage_flags = a0.premium_usage_flags;
|
|
if (premium_usage_flags !== undefined) {
|
|
a0.premiumUsageFlags = premium_usage_flags;
|
|
delete a0.premium_usage_flags;
|
|
}
|
|
if (value === a0.banner_color) {
|
|
delete a0.banner_color;
|
|
}
|
|
const avatar_decoration_data = a0.avatar_decoration_data;
|
|
if (avatar_decoration_data !== undefined) {
|
|
moduleValue2 = require(1857) /* metro dependency 1857: AvatarDecorationUtils */;
|
|
a0.avatarDecorationData = moduleValue2.parseAvatarDecorationData(avatar_decoration_data);
|
|
delete a0.avatar_decoration_data;
|
|
}
|
|
const collectibles = a0.collectibles;
|
|
if (collectibles !== undefined) {
|
|
delete a0.collectibles;
|
|
moduleValue3 = require(1858) /* metro dependency 1858: mappers */;
|
|
a0.collectibles = moduleValue3.parseServerUserCollectibles(collectibles);
|
|
}
|
|
const global_name = a0.global_name;
|
|
if (global_name !== undefined) {
|
|
a0.globalName = global_name;
|
|
delete a0.global_name;
|
|
}
|
|
const primary_guild = a0.primary_guild;
|
|
if (primary_guild !== undefined) {
|
|
moduleValue4 = require(1887) /* metro dependency 1887: PrimaryGuildUtils */;
|
|
a0.primary_guild = moduleValue4.ensureUserPrimaryGuild(primary_guild);
|
|
}
|
|
const display_name_styles = a0.display_name_styles;
|
|
if (display_name_styles !== undefined) {
|
|
moduleValue5 = require(1888) /* metro dependency 1888: DisplayNameStylesUtils */;
|
|
a0.displayNameStyles = moduleValue5.parseServerDisplayNameStyles(display_name_styles);
|
|
delete a0.display_name_styles;
|
|
}
|
|
const premium_state = a0.premium_state;
|
|
if (premium_state !== undefined) {
|
|
moduleValue6 = require(1892) /* metro dependency 1892: PremiumStateUtils */;
|
|
a0.premiumState = moduleValue6.parseServerPremiumState(premium_state);
|
|
delete a0.premium_state;
|
|
}
|
|
const restricted_schedule = a0.restricted_schedule;
|
|
if (restricted_schedule !== undefined) {
|
|
value4 = (require(1898) /* metro dependency 1898: FamilyCenterModels */).RestrictedScheduleRecord.fromServer(restricted_schedule);
|
|
a0.restrictedSchedule = value != value4 ? value4 : value;
|
|
delete a0.restricted_schedule;
|
|
}
|
|
const app_transaction_ids = a0.app_transaction_ids;
|
|
if (app_transaction_ids !== undefined) {
|
|
a0.appTransactionIds = app_transaction_ids;
|
|
delete a0.app_transaction_ids;
|
|
}
|
|
return a0;
|
|
}
|
|
|
|
function mergeUser(a0) { // fn#20287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:3506, offset: 0x00ec3eeb, size: 650 bytes, params: 2, frame: 24
|
|
var r3;
|
|
var r10;
|
|
var r4;
|
|
var r7;
|
|
var premiumType;
|
|
var getUserPremiumTypeBinding;
|
|
var moduleValue2;
|
|
var userPremiumTypeBinding;
|
|
var moduleValue3;
|
|
var moduleValue4;
|
|
var userRecord;
|
|
const value = a1;
|
|
const value2 = undefined;
|
|
let r0 = !(value !== value2) || value;
|
|
let binding = env0_16;
|
|
const property = binding[a0.id];
|
|
const r6 = value2 !== a0.id && a0.id === AuthenticationStore.getId();
|
|
if (property == null) {
|
|
transformUser(a0);
|
|
userRecord = new UserRecord(a0);
|
|
premiumType = userRecord.premiumType;
|
|
if (value2 !== premiumType && r6) {
|
|
userRecord.premiumType = getUserPremiumType((require(1883) /* metro dependency 1883: UserStoreUtils */).isStaffEnv(userRecord),
|
|
|
|
|
|
userRecord.premiumType);
|
|
r4 = userRecord;
|
|
r7 = premiumType;
|
|
} else {
|
|
r4 = userRecord;
|
|
r7 = premiumType;
|
|
}
|
|
} else if (r0) {
|
|
transformUser(a0);
|
|
r3 = a0.premium_type ?? a0.premiumType;
|
|
r0 = value2 !== r3 && r6;
|
|
r0 = r0 && (require(1883) /* metro dependency 1883: UserStoreUtils */).isStaffEnvRawData(a0);
|
|
if (r0) {
|
|
r10 = a0.premium_type ?? a0.premiumType;
|
|
getUserPremiumTypeBinding = getUserPremiumType;
|
|
moduleValue2 = require(1883) /* metro dependency 1883: UserStoreUtils */;
|
|
userPremiumTypeBinding = getUserPremiumTypeBinding(moduleValue2.isStaffEnvRawData(a0), r10);
|
|
if (value2 !== a0.premiumType) {
|
|
a0.premiumType = userPremiumTypeBinding;
|
|
} else if (value2 !== a0.premium_type) {
|
|
a0.premium_type = userPremiumTypeBinding;
|
|
}
|
|
}
|
|
r0 = property.primaryGuild == null && a0.primary_guild == null;
|
|
if (r0 !== true) {
|
|
if ((property.primaryGuild != null && a0.primary_guild == null) === true) {
|
|
a0.primary_guild = property.primaryGuild;
|
|
} else {
|
|
moduleValue3 = require(1887) /* metro dependency 1887: PrimaryGuildUtils */;
|
|
if (moduleValue3.isUserPrimaryGuildEqual(property.primaryGuild, a0.primary_guild) === true) {
|
|
a0.primary_guild = property.primaryGuild;
|
|
} else {
|
|
moduleValue4 = require(1887) /* metro dependency 1887: PrimaryGuildUtils */;
|
|
a0.primary_guild = moduleValue4.ensureUserPrimaryGuild(a0.primary_guild);
|
|
}
|
|
}
|
|
}
|
|
r4 = property.merge(a0);
|
|
r7 = r3;
|
|
} else {
|
|
r4 = property;
|
|
r7 = value2;
|
|
}
|
|
const userStoreUtilsModule = require(1883) /* metro dependency 1883: UserStoreUtils */;
|
|
userStoreUtilsModule.validatePremiumType(userStoreUtilsModule.isStaffEnv(r4), r7, r4.premiumType);
|
|
const value15 = env0_16[a0.id] !== r4;
|
|
env0_16[a0.id] = r4;
|
|
if (value15) {
|
|
binding = env0_17;
|
|
env0_17 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
|
}
|
|
return value15;
|
|
}
|
|
|
|
function getUserPremiumType(a0, a1) { // fn#20288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:4578, offset: 0x00ec4175, size: 57 bytes, params: 3, frame: 11
|
|
var premiumTypeOverride;
|
|
if (a0) {
|
|
premiumTypeOverride = OverridePremiumTypeStore.getPremiumTypeOverride();
|
|
return premiumTypeOverride !== UNSELECTED_PREMIUM_TYPE_OVERRIDE ? premiumTypeOverride : OverridePremiumTypeStore.getPremiumTypeActual();
|
|
}
|
|
return a1;
|
|
}
|
|
|
|
function mergeUsersFromMessage(a0, a1) { // fn#20290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:4857, offset: 0x00ec4210, size: 348 bytes, params: 3, frame: 19
|
|
const env0_0 = a1;
|
|
if (a0.author != null && a0.state !== 'SENDING' && isNotCurrentUser(a0.author)) {
|
|
mergeUser(a0.author, a1);
|
|
}
|
|
const mentions = a0.mentions;
|
|
if (mentions != null) {
|
|
mentions.forEach(_fun20291);
|
|
}
|
|
const interaction = a0.interaction;
|
|
value = undefined;
|
|
let user = interaction == null ? value : interaction.user;
|
|
if (user != null && isNotCurrentUser(a0.interaction == null ? value : a0.interaction.user)) {
|
|
mergeUser(a0.interaction.user, a1);
|
|
}
|
|
const attachments = a0.attachments;
|
|
if (attachments != null) {
|
|
attachments.forEach(function({clip_participants}) {
|
|
if (clip_participants != null) {
|
|
clip_participants.forEach(_fun20293);
|
|
}
|
|
});
|
|
}
|
|
processResolvedUsers(a0.resolved, a1);
|
|
const interaction_metadata = a0.interaction_metadata;
|
|
user = interaction_metadata == null ? value : interaction_metadata.user;
|
|
if (user != null && isNotCurrentUser(a0.interaction_metadata.user)) {
|
|
mergeUser(a0.interaction_metadata.user, a1);
|
|
}
|
|
if (a0.message_snapshots != null) {
|
|
a0.message_snapshots.forEach(_fun20294);
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function handleConnectionOpen_20296({user, users, guilds}) { // fn#20296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:6003, offset: 0x00ec44cd, size: 165 bytes, params: 2, frame: 15
|
|
var binding2;
|
|
delete user.premium;
|
|
delete user.banner_color;
|
|
mergeUser(user);
|
|
users.forEach(function(a0) {
|
|
mergeUser(a0);
|
|
});
|
|
guilds.forEach(function(a0) {
|
|
var env0_0 = a0;
|
|
a0.members.forEach(_fun20299);
|
|
});
|
|
let binding = env0_16;
|
|
const getId = AuthenticationStore.getId;
|
|
if (binding[Reflect.apply(getId, AuthenticationStore, [])] != null) {
|
|
binding = env0_16;
|
|
binding2 = env0_18;
|
|
({'id': null, 'username': 'Wumpus', 'discriminator': '0', 'globalName': 'Wumpus',
|
|
'avatar': 'c1f86b313385cb97985f1b118851c28c'}).id = binding2;
|
|
binding[binding2] = new UserRecord();
|
|
}
|
|
}
|
|
|
|
function handleConnectionOpenSupplemental({guilds, lazyPrivateChannels}) { // fn#20300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:6408, offset: 0x00ec45f1, size: 57 bytes, params: 2, frame: 13
|
|
guilds.forEach(function(a0) {
|
|
var env0_0 = a0;
|
|
a0.members.forEach(_fun20302);
|
|
});
|
|
if (lazyPrivateChannels != null) {
|
|
lazyPrivateChannels.forEach(function({rawRecipients}) {
|
|
if (rawRecipients != null) {
|
|
rawRecipients.forEach(_fun20304);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
function handleInitialize(a0) { // fn#20306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:6756, offset: 0x00ec4693, size: 139 bytes, params: 2, frame: 17
|
|
var r1;
|
|
var r0;
|
|
var value2;
|
|
var value3;
|
|
var done;
|
|
var value4;
|
|
var id;
|
|
var value5;
|
|
var isIncompleteUser2;
|
|
var binding;
|
|
var prototype;
|
|
var value6;
|
|
var userRecord;
|
|
var value7;
|
|
var value8;
|
|
const users = a0.users;
|
|
if (users != null) {
|
|
value2 = _createForOfIteratorHelperLoose_20280(a0.users);
|
|
value3 = value2();
|
|
done = value3.done;
|
|
if (!done) {
|
|
r1 = value3;
|
|
while (true) {
|
|
value4 = r1.value;
|
|
id = value4.id;
|
|
value5 = id in env0_16;
|
|
if (value5) {
|
|
isIncompleteUser2 = isIncompleteUser(value4);
|
|
r0 = isIncompleteUser2;
|
|
} else {
|
|
r0 = value5;
|
|
}
|
|
if (r0) {
|
|
continue;
|
|
}
|
|
binding = env0_16;
|
|
id = value4.id;
|
|
prototype = UserRecord.prototype;
|
|
value6 = Object.create(prototype, {constructor: {value: UserRecord}});
|
|
userRecord = new UserRecord();
|
|
value7 = userRecord instanceof Object ? userRecord : value6;
|
|
binding[id] = value7;
|
|
value8 = value2();
|
|
done = value8.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r1 = value8;
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function handleLoadMessages({messages}) { // fn#20312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:7394, offset: 0x00ec47eb, size: 30 bytes, params: 2, frame: 11
|
|
messages.forEach(function(a0) {
|
|
mergeUsersFromMessage(a0, true);
|
|
});
|
|
return false;
|
|
}
|
|
|
|
function handleLoadConversationMessages({messages}) { // fn#20314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:7490, offset: 0x00ec481f, size: 30 bytes, params: 2, frame: 11
|
|
messages.forEach(function(a0) {
|
|
mergeUsersFromMessage(a0, true);
|
|
});
|
|
return false;
|
|
}
|
|
|
|
function handleLoadPinnedMessages({pins}) { // fn#20316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:7598, offset: 0x00ec483d, size: 30 bytes, params: 2, frame: 11
|
|
pins.forEach(function({message}) {
|
|
mergeUsersFromMessage(message, true);
|
|
});
|
|
return false;
|
|
}
|
|
|
|
function handleThreadListSync({mostRecentMessages}) { // fn#20318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:7708, offset: 0x00ec4876, size: 36 bytes, params: 2, frame: 11
|
|
if (mostRecentMessages != null) {
|
|
mostRecentMessages.forEach(function(a0) {
|
|
mergeUsersFromMessage(a0, false);
|
|
});
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function handleLoadSearchResults({data}) { // fn#20320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:7825, offset: 0x00ec48b0, size: 29 bytes, params: 2, frame: 11
|
|
data.forEach(function({messages, channels}) {
|
|
messages.forEach(_fun20322);
|
|
channels.forEach(_fun20324);
|
|
});
|
|
return false;
|
|
}
|
|
|
|
function handleLoadThreadsSuccess({firstMessages, owners}) { // fn#20326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:8141, offset: 0x00ec49af, size: 61 bytes, params: 2, frame: 14
|
|
if (firstMessages != null) {
|
|
firstMessages.forEach(function(a0) {
|
|
mergeUsersFromMessage(a0, true);
|
|
});
|
|
}
|
|
if (owners != null) {
|
|
owners.forEach(function(a0) {
|
|
return mergeUser(a0.user, true);
|
|
});
|
|
}
|
|
}
|
|
|
|
function handleLoadForumPosts({threads}) { // fn#20329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:8302, offset: 0x00ec4a07, size: 48 bytes, params: 2, frame: 11
|
|
const Object = global.Object;
|
|
Object.values(threads).forEach(_fun20330);
|
|
}
|
|
|
|
function handleLoadMessageRequestsSupplementalDataSuccess({supplementalData}) { // fn#20331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:8544, offset: 0x00ec4aa5, size: 48 bytes, params: 2, frame: 11
|
|
const Object = global.Object;
|
|
Object.values(supplementalData).forEach(_fun20332);
|
|
}
|
|
|
|
function handleFetchUsersForGuildEventSuccess({guildScheduledEventUsers, guildId}) { // fn#20333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:8714, offset: 0x00ec4af9, size: 39 bytes, params: 2, frame: 11
|
|
guildScheduledEventUsers.forEach(_fun20334);
|
|
}
|
|
|
|
function handleLoadNotificationCenterItems({items}) { // fn#20335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:8928, offset: 0x00ec4b70, size: 30 bytes, params: 2, frame: 11
|
|
items.forEach(_fun20336);
|
|
}
|
|
|
|
function handleNotificationCenterItemCreate({item}) { // fn#20337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:9044, offset: 0x00ec4bb5, size: 44 bytes, params: 2, frame: 11
|
|
if (item.other_user != null) {
|
|
mergeUser(item.other_user);
|
|
}
|
|
}
|
|
|
|
function handleIncomingMessage({message}) { // fn#20338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:9142, offset: 0x00ec4be1, size: 205 bytes, params: 2, frame: 21
|
|
var r0;
|
|
var binding;
|
|
var property;
|
|
var value3;
|
|
var id;
|
|
var set;
|
|
var moduleValue2;
|
|
mergeUsersFromMessage(message, true);
|
|
let flags = message.flags;
|
|
if (flags != null) {
|
|
var moduleValue = importAll(1391) /* metro dependency 1391: FlagUtils */;
|
|
var hasFlag = moduleValue.hasFlag;
|
|
flags = message.flags;
|
|
var URGENT = MessageFlags.URGENT;
|
|
if (Reflect.apply(hasFlag, moduleValue, [flags, URGENT])) {
|
|
binding = env0_16;
|
|
property = binding[AuthenticationStore.getId()];
|
|
value3 = property != null;
|
|
if (value3) {
|
|
binding = env0_16;
|
|
id = AuthenticationStore.getId();
|
|
set = property.set;
|
|
moduleValue2 = importAll(1391) /* metro dependency 1391: FlagUtils */;
|
|
binding[id] = Reflect.apply(set, property, ['flags', moduleValue2.setFlag(property.flags,
|
|
UserFlags.HAS_UNREAD_URGENT_MESSAGES, true)]);
|
|
r0 = true;
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
return r0;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function handleCreateChannel({channel}) { // fn#20339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:9405, offset: 0x00ec4cae, size: 41 bytes, params: 2, frame: 11
|
|
const rawRecipients = channel.rawRecipients;
|
|
if (rawRecipients != null) {
|
|
rawRecipients.forEach(function(a0) {
|
|
return mergeUser(a0);
|
|
});
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function handleUpdateChannels({channels}) { // fn#20341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:9511, offset: 0x00ec4cea, size: 88 bytes, params: 2, frame: 16
|
|
var r1;
|
|
var value3;
|
|
var rawRecipients;
|
|
var value4;
|
|
const value = _createForOfIteratorHelperLoose_20280(channels);
|
|
const value2 = value();
|
|
let done = value2.done;
|
|
if (!done) {
|
|
r1 = value2;
|
|
while (true) {
|
|
value3 = r1.value;
|
|
rawRecipients = value3.rawRecipients;
|
|
if (rawRecipients != null) {
|
|
rawRecipients.forEach(function(a0) {
|
|
return mergeUser(a0);
|
|
});
|
|
}
|
|
value4 = value();
|
|
done = value4.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r1 = value4;
|
|
continue;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function handlePresenceUpdates({updates}) { // fn#20343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:9773, offset: 0x00ec4d42, size: 44 bytes, params: 2, frame: 12
|
|
return updates.map(_fun20344).some(function(a0) {
|
|
return a0;
|
|
});
|
|
}
|
|
|
|
function handleLoadedBans({bans}) { // fn#20347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:10044, offset: 0x00ec4e4e, size: 30 bytes, params: 2, frame: 11
|
|
bans.forEach(function(a0) {
|
|
return mergeUser(a0.user);
|
|
});
|
|
}
|
|
|
|
function handleLoadedBansBatch({bans}) { // fn#20349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:10114, offset: 0x00ec4e84, size: 30 bytes, params: 2, frame: 11
|
|
bans.forEach(function(a0) {
|
|
return mergeUser(a0.user);
|
|
});
|
|
}
|
|
|
|
function handleRecipient(a0) { // fn#20352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:10236, offset: 0x00ec4eba, size: 39 bytes, params: 2, frame: 12
|
|
const isMember = a0.isMember;
|
|
return isMember ? mergeUser(a0.user) : !!isMember;
|
|
}
|
|
|
|
function handleGuildMembers(a0) { // fn#20353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:10302, offset: 0x00ec4ee1, size: 62 bytes, params: 2, frame: 16
|
|
const mergeUserBinding = mergeUser;
|
|
let user = a0.user;
|
|
const value2 = mergeUserBinding(user);
|
|
const mergeGuildAvatarBinding = mergeGuildAvatar;
|
|
user = a0.user;
|
|
return mergeGuildAvatarBinding(user.id, a0.guildId, a0.avatar) || value2;
|
|
}
|
|
|
|
function handleGuildMemberListUpdate({ops}) { // fn#20354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:10414, offset: 0x00ec4f1f, size: 150 bytes, params: 2, frame: 22
|
|
var r3;
|
|
var user;
|
|
var value5;
|
|
var op;
|
|
var item;
|
|
var member;
|
|
var mergeUserPrimaryGuildBinding;
|
|
var id;
|
|
var value6;
|
|
const value3 = _createForOfIteratorHelperLoose_20280(ops);
|
|
const value4 = value3();
|
|
let done = value4.done;
|
|
if (!done) {
|
|
r3 = value4;
|
|
reducibleLoop1: while (true) {
|
|
value5 = r3.value;
|
|
op = value5.op;
|
|
reducibleJoin7: while (true) {
|
|
reducibleJoin5: while (true) {
|
|
if (op === 'INSERT') {
|
|
member = value5.item.member;
|
|
if (member == null) {
|
|
user = undefined;
|
|
break reducibleJoin5;
|
|
}
|
|
user = member.user;
|
|
break reducibleJoin5;
|
|
}
|
|
op = value5.op;
|
|
if (op !== 'UPDATE') {
|
|
break reducibleJoin7;
|
|
}
|
|
item = value5.item;
|
|
member = item.member;
|
|
if (member == null) {
|
|
user = undefined;
|
|
break reducibleJoin5;
|
|
}
|
|
user = member.user;
|
|
break reducibleJoin5;
|
|
}
|
|
if (user == null) {
|
|
break reducibleJoin7;
|
|
}
|
|
mergeUserPrimaryGuildBinding = mergeUserPrimaryGuild;
|
|
id = user.id;
|
|
mergeUserPrimaryGuildBinding(id, user);
|
|
break reducibleJoin7;
|
|
}
|
|
value6 = value3();
|
|
done = value6.done;
|
|
if (done) {
|
|
break reducibleLoop1;
|
|
}
|
|
r3 = value6;
|
|
continue reducibleLoop1;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function handleGuildMembersChunkBatch({chunks}) { // fn#20355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:10680, offset: 0x00ec4fb5, size: 79 bytes, params: 2, frame: 15
|
|
var r2;
|
|
var value3;
|
|
var value4;
|
|
const closure = handleGuildMembersChunkBatch_loop;
|
|
const value = _createForOfIteratorHelperLoose_20280(chunks);
|
|
const value2 = value();
|
|
let done = value2.done;
|
|
if (!done) {
|
|
for (r2 = value2; true; r2 = value4) {
|
|
value3 = r2.value;
|
|
closure(value3);
|
|
value4 = value();
|
|
done = value4.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function handleLocalMessagesLoaded({users}) { // fn#20359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:11176, offset: 0x00ec5104, size: 133 bytes, params: 2, frame: 21
|
|
var r2;
|
|
var r3;
|
|
var r1;
|
|
var r8;
|
|
var value5;
|
|
var Object;
|
|
var hasOwn;
|
|
var binding;
|
|
var id;
|
|
var value6;
|
|
var value7;
|
|
const _createForOfIteratorHelperLoose_20280Binding = _createForOfIteratorHelperLoose_20280;
|
|
let r0 = users ?? [];
|
|
const value2 = _createForOfIteratorHelperLoose_20280Binding(r0);
|
|
const value3 = value2();
|
|
let done = value3.done;
|
|
if (done) {
|
|
r0 = false;
|
|
} else {
|
|
r2 = false;
|
|
r3 = value3;
|
|
while (true) {
|
|
value5 = r3.value;
|
|
Object = global.Object;
|
|
hasOwn = Object.hasOwn;
|
|
binding = env0_16;
|
|
id = value5.id;
|
|
if (Reflect.apply(hasOwn, Object, [binding, id])) {
|
|
r8 = r2;
|
|
} else {
|
|
value6 = mergeUser(value5);
|
|
if (value6) {
|
|
r1 = value6;
|
|
continue;
|
|
}
|
|
r1 = r2;
|
|
continue;
|
|
r8 = r1;
|
|
}
|
|
value7 = value2();
|
|
done = value7.done;
|
|
if (done) {
|
|
r0 = r8;
|
|
break;
|
|
}
|
|
r2 = r8;
|
|
r3 = value7;
|
|
continue;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function handleThreadMemberListUpdate({members}) { // fn#20360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:11371, offset: 0x00ec5189, size: 38 bytes, params: 2, frame: 12
|
|
members.forEach(_fun20361);
|
|
return false;
|
|
}
|
|
|
|
function handleThreadMembersUpdate({addedMembers}) { // fn#20362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:11560, offset: 0x00ec521c, size: 44 bytes, params: 2, frame: 12
|
|
if (addedMembers != null) {
|
|
addedMembers.forEach(_fun20363);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function handleGuildCreate({guild}) { // fn#20364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:11760, offset: 0x00ec5248, size: 39 bytes, params: 2, frame: 11
|
|
guild.members.forEach(function(a0) {
|
|
var property = a0.user;
|
|
var id = property.id;
|
|
var username = property.username;
|
|
var avatar = property.avatar;
|
|
var discriminator = property.discriminator;
|
|
property = property.bot;
|
|
var avatar2 = a0.avatar;
|
|
if (id !== AuthenticationStore.getId()) {
|
|
mergeUser({id: id, username: username, avatar: avatar, discriminator: discriminator, bot: property});
|
|
}
|
|
mergeGuildAvatar(id, guild.id, avatar2);
|
|
});
|
|
}
|
|
|
|
function handleLoadRelationships({relationships}) { // fn#20368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:12143, offset: 0x00ec532b, size: 32 bytes, params: 2, frame: 13
|
|
return relationships.reduce(function(a0, a1) {
|
|
return mergeUser(a1.user) || a0;
|
|
}, false);
|
|
}
|
|
|
|
function handleLoadFriendSuggestions({suggestions}) { // fn#20371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:12332, offset: 0x00ec538b, size: 32 bytes, params: 2, frame: 13
|
|
return suggestions.reduce(function(a0, a1) {
|
|
return mergeUser(a1.suggested_user) || a0;
|
|
}, false);
|
|
}
|
|
|
|
function handleAuditLogFetched({users}) { // fn#20373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:12446, offset: 0x00ec53cd, size: 30 bytes, params: 2, frame: 11
|
|
users.forEach(_fun20374);
|
|
}
|
|
|
|
function handleGiftCodeResolve({giftCode}) { // fn#20375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:12540, offset: 0x00ec5430, size: 44 bytes, params: 2, frame: 12
|
|
const user = giftCode.user;
|
|
return user != null && mergeUser(giftCode.user);
|
|
}
|
|
|
|
function handleGuildPremiumSubscriptionsFetchSuccess({appliedBoosts}) { // fn#20376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:12624, offset: 0x00ec545c, size: 30 bytes, params: 2, frame: 11
|
|
appliedBoosts.forEach(_fun20377);
|
|
}
|
|
|
|
function handleGuildJoinRequest({request}) { // fn#20378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:12745, offset: 0x00ec549a, size: 77 bytes, params: 2, frame: 14
|
|
const user = request.user;
|
|
const actioned_by_user = request.actioned_by_user;
|
|
const r2 = user != null && mergeUser(user);
|
|
return actioned_by_user == null ? r2 : r2 || mergeUser(actioned_by_user);
|
|
}
|
|
|
|
function handleInitialFamilyCenterLoad({users, familyCenterTeenActivity}) { // fn#20379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:12893, offset: 0x00ec54e7, size: 64 bytes, params: 2, frame: 14
|
|
const items2 = [];
|
|
const value = arraySpread(items2, users, 0, items2);
|
|
users = familyCenterTeenActivity.users;
|
|
arraySpread(items2, users, value, items2);
|
|
return items2.reduce(function(a0, a1) {
|
|
return mergeUser(a1) || a0;
|
|
}, false);
|
|
}
|
|
|
|
function handleLinkedUserFetch({users}) { // fn#20381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:13030, offset: 0x00ec5543, size: 32 bytes, params: 2, frame: 13
|
|
return users.reduce(function(a0, a1) {
|
|
return mergeUser(a1) || a0;
|
|
}, false);
|
|
}
|
|
|
|
function handleRequestLinkSuccess({users}) { // fn#20383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:13117, offset: 0x00ec5563, size: 32 bytes, params: 2, frame: 13
|
|
return users.reduce(function(a0, a1) {
|
|
return mergeUser(a1) || a0;
|
|
}, false);
|
|
}
|
|
|
|
function handleTeenActivityFetch({familyCenterTeenActivity}) { // fn#20385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:13207, offset: 0x00ec5583, size: 46 bytes, params: 2, frame: 13
|
|
if (familyCenterTeenActivity !== undefined) {
|
|
return familyCenterTeenActivity.users.reduce(function(a0, a1) {
|
|
return mergeUser(a1) || a0;
|
|
}, false);
|
|
}
|
|
}
|
|
|
|
function handleTeenActivityMoreFetch({familyCenterTeenActivity}) { // fn#20387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:13335, offset: 0x00ec55b1, size: 38 bytes, params: 2, frame: 13
|
|
const users = familyCenterTeenActivity.users;
|
|
return users.reduce(function(a0, a1) {
|
|
return mergeUser(a1) || a0;
|
|
}, false);
|
|
}
|
|
|
|
function handleMemberSafetyGuildMemberSearchSuccess({members}) { // fn#20389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:13453, offset: 0x00ec55d7, size: 53 bytes, params: 2, frame: 13
|
|
const env0_0 = AuthenticationStore.getId();
|
|
return members.reduce(_fun20390, false);
|
|
}
|
|
|
|
function handleLoadICYMIHydratedItems({messageItems}) { // fn#20391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:13614, offset: 0x00ec5654, size: 33 bytes, params: 2, frame: 13
|
|
messageItems.forEach(_fun20392, false);
|
|
}
|
|
|
|
function handleEmbeddedActivityUpdateV2({participants}) { // fn#20393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:13744, offset: 0x00ec569d, size: 32 bytes, params: 2, frame: 13
|
|
return participants.reduce(function(a0, a1) {
|
|
var r0;
|
|
var value = a0;
|
|
r0 = importDefault(dependencyMap[20])(a1) && mergeUser(a1.member.user);
|
|
r0 = !r0 ? value : r0;
|
|
return r0;
|
|
}, false);
|
|
}
|
|
|
|
function handleInitiateAgeVerification(a0) { // fn#20395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:13872, offset: 0x00ec5700, size: 133 bytes, params: 2, frame: 18
|
|
var r0;
|
|
if (a0 == null) {
|
|
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", undefined);
|
|
throw undefined;
|
|
}
|
|
const binding = env0_16;
|
|
const getId = AuthenticationStore.getId;
|
|
const property = binding[Reflect.apply(getId, AuthenticationStore, [])];
|
|
const value2 = property != null;
|
|
if (value2) {
|
|
env0_16[AuthenticationStore.getId()] = property.set('ageVerificationStatus',
|
|
(require(1909) /* metro dependency 1909: Server */).AgeVerificationStatusUkAndAusOnly.CLIENT_ONLY_PENDING);
|
|
r0 = true;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function handleCloseAgeVerificationModal({status}) { // fn#20396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:14063, offset: 0x00ec5785, size: 133 bytes, params: 2, frame: 17
|
|
var r1;
|
|
var r0;
|
|
var value3;
|
|
var value;
|
|
let binding = env0_16;
|
|
const getId = AuthenticationStore.getId;
|
|
const property = binding[Reflect.apply(getId, AuthenticationStore, [])];
|
|
const value2 = property != null;
|
|
if (value2) {
|
|
value3 = property.ageVerificationStatus === (require(1909) /* metro dependency 1909: Server */).AgeVerificationStatusUkAndAusOnly.CLIENT_ONLY_PENDING;
|
|
if (value3) {
|
|
binding = env0_16;
|
|
value = AuthenticationStore.getId();
|
|
binding[value] = property.set('ageVerificationStatus', status);
|
|
value = true;
|
|
r1 = value;
|
|
} else {
|
|
r1 = value3;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function handleGuildStickersFetchSuccess({stickers}) { // fn#20398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:14381, offset: 0x00ec5826, size: 32 bytes, params: 2, frame: 13
|
|
return stickers.reduce(function(a0, a1) {
|
|
var r0;
|
|
var value = a0;
|
|
r0 = a1.user != null && mergeUser(a1.user);
|
|
r0 = !r0 ? value : r0;
|
|
return r0;
|
|
}, false);
|
|
}
|
|
|
|
function _fun20400(a0) { // fn#20400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:14506, offset: 0x00ec5875, size: 277 bytes, params: 2, frame: 16
|
|
const closure = UserStore;
|
|
env0_8(closure, a0);
|
|
return env0_5(closure, [{key: 'initialize', value: function() {
|
|
this.waitFor(AuthenticationStore, OverridePremiumTypeStore);
|
|
}}, {key: 'takeSnapshot', value: value_20404}, {key: 'handleLoadCache', value: value_20405},
|
|
{key: 'getUserStoreVersion', value: value_20407}, {key: 'getUser', value: value_20408}, {key: 'getUsers',
|
|
value: value_20409}, {key: 'forEach', value: value_20410}, {key: 'findByTag', value: value_20411},
|
|
{key: 'filter', value: value_20412}, {key: 'getCurrentUser', value: value_20414}]);
|
|
}
|
|
|
|
function _fun20291(a0) { // fn#20291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:5027, offset: 0x00ec436c, size: 39 bytes, params: 2, frame: 13
|
|
if (isNotCurrentUser(a0)) {
|
|
mergeUser(a0, require);
|
|
}
|
|
}
|
|
|
|
function _fun20292({clip_participants}) { // fn#20292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:5242, offset: 0x00ec4393, size: 38 bytes, params: 2, frame: 11
|
|
if (clip_participants != null) {
|
|
clip_participants.forEach(_fun20293);
|
|
}
|
|
}
|
|
|
|
function _fun20294(a0) { // fn#20294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:5575, offset: 0x00ec43e0, size: 237 bytes, params: 2, frame: 16
|
|
var environment;
|
|
var value2;
|
|
var value4;
|
|
let moderator_report = a0.moderator_report;
|
|
const value = undefined;
|
|
let user = moderator_report == null || moderator_report.reported_member == null ? value : moderator_report.reported_member.user;
|
|
if (user != null) {
|
|
value2 = environment.__proto__;
|
|
mergeUser(a0.moderator_report.reported_member.user, require);
|
|
}
|
|
moderator_report = a0.moderator_report;
|
|
user = moderator_report == null || moderator_report.reporting_member == null ? value : moderator_report.reporting_member.user;
|
|
if (user != null) {
|
|
value4 = environment.__proto__;
|
|
mergeUser(a0.moderator_report.reporting_member.user, require);
|
|
}
|
|
const Object = global.Object;
|
|
const values = Object.values;
|
|
const message = a0.message;
|
|
const users = message == null || message.resolved == null ? value : message.resolved.users;
|
|
Reflect.apply(values, Object, [users ?? ({})]).forEach(_fun20295);
|
|
return value;
|
|
}
|
|
|
|
function _fun20298(a0) { // fn#20298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:6154, offset: 0x00ec4585, size: 34 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
a0.members.forEach(_fun20299);
|
|
}
|
|
|
|
function _fun20301(a0) { // fn#20301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:6495, offset: 0x00ec462a, size: 34 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
a0.members.forEach(_fun20302);
|
|
}
|
|
|
|
function _fun20303({rawRecipients}) { // fn#20303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:6630, offset: 0x00ec464c, size: 36 bytes, params: 2, frame: 11
|
|
if (rawRecipients != null) {
|
|
rawRecipients.forEach(function(a0) {
|
|
mergeUser(a0);
|
|
});
|
|
}
|
|
}
|
|
|
|
function _fun20321({messages, channels}) { // fn#20321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:7886, offset: 0x00ec48cd, size: 51 bytes, params: 2, frame: 13
|
|
messages.forEach(function(a0) {
|
|
a0.forEach(_fun20323);
|
|
});
|
|
channels.forEach(function(a0) {
|
|
var property = a0.type;
|
|
if (!(property !== ChannelTypes.DM && a0.type !== ChannelTypes.GROUP_DM)) {
|
|
property = a0.recipients;
|
|
if (property != null) {
|
|
property.forEach(_fun20325);
|
|
}
|
|
if (a0.recipient != null) {
|
|
mergeUser(a0.recipient);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function _fun20330({first_message, most_recent_message, owner}) { // fn#20330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:8371, offset: 0x00ec4a37, size: 110 bytes, params: 2, frame: 16
|
|
var value;
|
|
if (first_message != null) {
|
|
value = environment.__proto__;
|
|
mergeUsersFromMessage(first_message, true);
|
|
}
|
|
if (most_recent_message != null) {
|
|
value = environment.__proto__;
|
|
mergeUsersFromMessage(most_recent_message, true);
|
|
}
|
|
if (owner != null && owner.user != null) {
|
|
value = environment.__proto__;
|
|
mergeUser(owner.user, true);
|
|
}
|
|
}
|
|
|
|
function _fun20332({message_preview}) { // fn#20332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:8650, offset: 0x00ec4ad5, size: 36 bytes, params: 2, frame: 13
|
|
var value;
|
|
if (message_preview != null) {
|
|
value = environment.__proto__;
|
|
mergeUsersFromMessage(message_preview, true);
|
|
}
|
|
}
|
|
|
|
function _fun20334({user, member}) { // fn#20334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:8811, offset: 0x00ec4b20, size: 80 bytes, params: 2, frame: 17
|
|
var avatar;
|
|
var value;
|
|
var mergeUserBinding;
|
|
var value2;
|
|
if (user != null) {
|
|
value = environment.__proto__;
|
|
mergeUserBinding = mergeUser;
|
|
value2 = undefined;
|
|
mergeUserBinding(user);
|
|
avatar = member == null ? value2 : member.avatar;
|
|
if (avatar != null) {
|
|
mergeGuildAvatar(user.id, guildId, avatar);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun20336(a0) { // fn#20336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:8993, offset: 0x00ec4b8e, size: 39 bytes, params: 2, frame: 11
|
|
var value;
|
|
if (a0.other_user != null) {
|
|
value = environment.__proto__;
|
|
mergeUser(a0.other_user);
|
|
}
|
|
}
|
|
|
|
function _fun20344(a0) { // fn#20344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:9831, offset: 0x00ec4d6e, size: 102 bytes, params: 2, frame: 15
|
|
var r0;
|
|
const env0_0 = a0;
|
|
const binding = env1_16;
|
|
const user = a0.user;
|
|
const property = binding[user.id];
|
|
const env0_1 = property;
|
|
if (property == null) {
|
|
return false;
|
|
}
|
|
const value2 = env1_19.reduce(_fun20345, false);
|
|
if (value2) {
|
|
env1_16[env0_1.id] = env0_1;
|
|
r0 = value2;
|
|
} else {
|
|
r0 = !!value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function handleGuildMembersChunkBatch_loop(a0) { // fn#20356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:10751, owner: handleGuildMembersChunkBatch._loop, offset: 0x00ec5004, size: 55 bytes, params: 2, frame: 13
|
|
const r1 = a0.members.reduce(_fun20357, false) || a0;
|
|
}
|
|
|
|
function _fun20361(a0) { // fn#20361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:11449, offset: 0x00ec51af, size: 109 bytes, params: 2, frame: 14
|
|
var r0;
|
|
let value = a0.member != null;
|
|
if (value) {
|
|
value = environment.__proto__;
|
|
value = mergeUser(a0.member.user);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
if (r0) {
|
|
}
|
|
value = a0.presence != null;
|
|
if (value) {
|
|
value = environment.__proto__;
|
|
value = mergeUser(a0.presence.user);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
if (r0) {
|
|
}
|
|
}
|
|
|
|
function _fun20374(a0) { // fn#20374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:12499, offset: 0x00ec53eb, size: 69 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__;
|
|
if (env1_16[a0.id] == null) {
|
|
env1_16[a0.id] = new UserRecord(a0);
|
|
}
|
|
}
|
|
|
|
function _fun20377({user}) { // fn#20377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:12707, offset: 0x00ec547a, size: 32 bytes, params: 2, frame: 11
|
|
var value;
|
|
if (user != null) {
|
|
value = environment.__proto__;
|
|
mergeUser(user);
|
|
}
|
|
}
|
|
|
|
function _fun20390(a0, a1) { // fn#20390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:13551, offset: 0x00ec560c, size: 72 bytes, params: 3, frame: 13
|
|
const value = a0;
|
|
const user = a1.member.user;
|
|
return user.id === env0_0 ? value : mergeUser(a1.member.user) || value;
|
|
}
|
|
|
|
function _fun20392(a0) { // fn#20392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:13681, offset: 0x00ec5675, size: 40 bytes, params: 2, frame: 13
|
|
var value;
|
|
if (a0.message != null) {
|
|
value = environment.__proto__;
|
|
mergeUsersFromMessage(a0.message, true);
|
|
}
|
|
}
|
|
|
|
function UserStore() { // fn#20401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:14518, offset: 0x00ec598a, size: 694 bytes, params: 1, frame: 20
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
env1_4(this, UserStore);
|
|
const handleLoadSearchResultsBinding = handleLoadSearchResults;
|
|
const handleLoadMessagesBinding = handleLoadMessages;
|
|
const handleIncomingMessageBinding = handleIncomingMessage;
|
|
const handleBanBinding = handleBan;
|
|
const handleRecipientBinding = handleRecipient;
|
|
const handleGuildJoinRequestBinding = handleGuildJoinRequest;
|
|
const handleGuildMembersBinding = handleGuildMembers;
|
|
const handleAuditLogFetchedBinding = handleAuditLogFetched;
|
|
const handleLoadThreadsSuccessBinding = handleLoadThreadsSuccess;
|
|
const items2 = [{CONNECTION_OPEN: handleConnectionOpen_20296,
|
|
CONNECTION_OPEN_SUPPLEMENTAL: handleConnectionOpenSupplemental, UPDATE_CLIENT_PREMIUM_TYPE: updatePremiumType,
|
|
OVERLAY_INITIALIZE: handleInitialize, CACHE_LOADED: CACHE_LOADED_20402, USER_UPDATE: handleUserUpdate,
|
|
USER_RESTRICTED_SCHEDULE_UPDATE: handleRestrictedScheduleUpdate,
|
|
USER_PROFILE_FETCH_SUCCESS: handleUserProfileFetchSuccess, CURRENT_USER_UPDATE: handleCurrentUserUpdate,
|
|
PRESENCE_UPDATES: handlePresenceUpdates, SEARCH_MESSAGES_SUCCESS: handleLoadSearchResultsBinding,
|
|
MOD_VIEW_SEARCH_MESSAGES_SUCCESS: handleLoadSearchResultsBinding,
|
|
LOAD_MESSAGES_SUCCESS: handleLoadMessagesBinding, LOAD_MESSAGES_AROUND_SUCCESS: handleLoadMessagesBinding,
|
|
LOAD_RECENT_MENTIONS_SUCCESS: handleLoadMessagesBinding,
|
|
CONVERSATION_FETCH_SUCCESS: handleLoadConversationMessages,
|
|
LOAD_PINNED_MESSAGES_SUCCESS: handleLoadPinnedMessages, THREAD_LIST_SYNC: handleThreadListSync,
|
|
MESSAGE_CREATE: handleIncomingMessageBinding, MESSAGE_UPDATE: handleIncomingMessageBinding,
|
|
GUILD_SETTINGS_LOADED_BANS: handleLoadedBans, GUILD_SETTINGS_LOADED_BANS_BATCH: handleLoadedBansBatch,
|
|
GUILD_CREATE: handleGuildCreate, GUILD_BAN_ADD: handleBanBinding, GUILD_BAN_REMOVE: handleBanBinding,
|
|
CHANNEL_RECIPIENT_ADD: handleRecipientBinding, CHANNEL_RECIPIENT_REMOVE: handleRecipientBinding,
|
|
GUILD_STICKERS_FETCH_SUCCESS: handleGuildStickersFetchSuccess,
|
|
GUILD_JOIN_REQUEST_CREATE: handleGuildJoinRequestBinding,
|
|
GUILD_JOIN_REQUEST_UPDATE: handleGuildJoinRequestBinding, GUILD_MEMBER_ADD: handleGuildMembersBinding,
|
|
GUILD_MEMBER_UPDATE: handleGuildMembersBinding, GUILD_MEMBERS_CHUNK_BATCH: handleGuildMembersChunkBatch,
|
|
GUILD_MEMBER_LIST_UPDATE: handleGuildMemberListUpdate, THREAD_MEMBER_LIST_UPDATE: handleThreadMemberListUpdate,
|
|
THREAD_MEMBERS_UPDATE: handleThreadMembersUpdate, CHANNEL_CREATE: handleCreateChannel,
|
|
CHANNEL_UPDATES: handleUpdateChannels, RELATIONSHIP_ADD: handleRelationshipAdd,
|
|
GAME_RELATIONSHIP_ADD: handleGameRelationshipAdd, LOAD_RELATIONSHIPS_SUCCESS: handleLoadRelationships,
|
|
FRIEND_SUGGESTION_CREATE: handleFriendSuggestionCreate,
|
|
LOAD_FRIEND_SUGGESTIONS_SUCCESS: handleLoadFriendSuggestions,
|
|
AUDIT_LOG_FETCH_SUCCESS: handleAuditLogFetchedBinding,
|
|
AUDIT_LOG_FETCH_NEXT_PAGE_SUCCESS: handleAuditLogFetchedBinding,
|
|
GIFT_CODE_RESOLVE_SUCCESS: handleGiftCodeResolve,
|
|
GUILD_APPLIED_BOOSTS_FETCH_SUCCESS: handleGuildPremiumSubscriptionsFetchSuccess,
|
|
LOAD_THREADS_SUCCESS: handleLoadThreadsSuccessBinding,
|
|
LOAD_ARCHIVED_THREADS_SUCCESS: handleLoadThreadsSuccessBinding, LOAD_FORUM_POSTS: handleLoadForumPosts,
|
|
GUILD_SCHEDULED_EVENT_USERS_FETCH_SUCCESS: handleFetchUsersForGuildEventSuccess,
|
|
LOAD_NOTIFICATION_CENTER_ITEMS_SUCCESS: handleLoadNotificationCenterItems,
|
|
NOTIFICATION_CENTER_ITEM_CREATE: handleNotificationCenterItemCreate,
|
|
LOAD_MESSAGE_REQUESTS_SUPPLEMENTAL_DATA_SUCCESS: handleLoadMessageRequestsSupplementalDataSuccess,
|
|
PASSIVE_UPDATE_V2: handlePassiveUpdateV2, LOCAL_MESSAGES_LOADED: handleLocalMessagesLoaded,
|
|
FAMILY_CENTER_INITIAL_LOAD: handleInitialFamilyCenterLoad,
|
|
FAMILY_CENTER_LINKED_USERS_FETCH_SUCCESS: handleLinkedUserFetch,
|
|
FAMILY_CENTER_TEEN_ACTIVITY_FETCH_SUCCESS: handleTeenActivityFetch,
|
|
FAMILY_CENTER_TEEN_ACTIVITY_MORE_FETCH_SUCCESS: handleTeenActivityMoreFetch,
|
|
FAMILY_CENTER_REQUEST_LINK_SUCCESS: handleRequestLinkSuccess,
|
|
MEMBER_SAFETY_GUILD_MEMBER_SEARCH_SUCCESS: handleMemberSafetyGuildMemberSearchSuccess,
|
|
LOAD_ICYMI_HYDRATED: handleLoadICYMIHydratedItems, EMBEDDED_ACTIVITY_UPDATE_V2: handleEmbeddedActivityUpdateV2,
|
|
INITIATE_AGE_VERIFICATION: handleInitiateAgeVerification,
|
|
CLOSE_AGE_VERIFICATION_MODAL: handleCloseAgeVerificationModal,
|
|
INTERACTION_MODAL_CREATE: handleInteractionModalCreate}];
|
|
const value3 = env1_7(UserStore);
|
|
return env1_6(this, _isNativeReflectConstruct_20277() ? global.Reflect.construct(value3, items2,
|
|
env1_7(this).constructor) : value3.apply(this, items2));
|
|
}
|
|
|
|
function value_20404() { // fn#20404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:18252, offset: 0x00ec5c77, size: 94 bytes, params: 1, frame: 15
|
|
let value = this.getCurrentUser();
|
|
const object3 = {};
|
|
const LATEST_SNAPSHOT_VERSION = UserStore.LATEST_SNAPSHOT_VERSION;
|
|
object3.version = LATEST_SNAPSHOT_VERSION;
|
|
const object4 = {};
|
|
const items2 = [value];
|
|
const filter = items2.filter;
|
|
value = environment.__proto__;
|
|
object4.users = Reflect.apply(filter, items2,
|
|
[(require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish]);
|
|
object3.data = object4;
|
|
return object3;
|
|
}
|
|
|
|
function value_20405(a0) { // fn#20405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:18433, offset: 0x00ec5cd5, size: 392 bytes, params: 2, frame: 20
|
|
var environment;
|
|
var r2;
|
|
var r1;
|
|
var r4;
|
|
var r8;
|
|
var value2;
|
|
var _createForOfIteratorHelperLoose_20280Binding;
|
|
var users;
|
|
var value3;
|
|
var done;
|
|
var value4;
|
|
var binding;
|
|
var id;
|
|
var prototype;
|
|
var value5;
|
|
var userRecord;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var value9;
|
|
var value10;
|
|
var value11;
|
|
var isIncompleteUser2;
|
|
var value12;
|
|
var value13;
|
|
var value14;
|
|
var value16;
|
|
var value17;
|
|
var rawRecipients;
|
|
var forEach;
|
|
var value18;
|
|
const readSnapshot = this.readSnapshot;
|
|
const LATEST_SNAPSHOT_VERSION = UserStore.LATEST_SNAPSHOT_VERSION;
|
|
let value = Reflect.apply(readSnapshot, this, [LATEST_SNAPSHOT_VERSION]);
|
|
reducibleJoin3: while (true) {
|
|
if (value == null) {
|
|
break reducibleJoin3;
|
|
}
|
|
value2 = environment.__proto__;
|
|
_createForOfIteratorHelperLoose_20280Binding = _createForOfIteratorHelperLoose_20280;
|
|
users = value.users;
|
|
value = _createForOfIteratorHelperLoose_20280Binding(users);
|
|
value3 = value();
|
|
done = value3.done;
|
|
if (done) {
|
|
break reducibleJoin3;
|
|
}
|
|
r2 = value3;
|
|
reducibleLoop2: while (true) {
|
|
value4 = r2.value;
|
|
binding = env1_16;
|
|
id = value4.id;
|
|
prototype = UserRecord.prototype;
|
|
value5 = Object.create(prototype, {constructor: {value: UserRecord}});
|
|
userRecord = new UserRecord();
|
|
value6 = userRecord instanceof Object ? userRecord : value5;
|
|
binding[id] = value6;
|
|
value7 = value();
|
|
done = value7.done;
|
|
if (done) {
|
|
break reducibleJoin3;
|
|
}
|
|
r2 = value7;
|
|
continue reducibleLoop2;
|
|
}
|
|
}
|
|
users = a0.users;
|
|
reducibleJoin10: while (true) {
|
|
if (users == null) {
|
|
break reducibleJoin10;
|
|
}
|
|
value = environment.__proto__;
|
|
_createForOfIteratorHelperLoose_20280Binding = _createForOfIteratorHelperLoose_20280;
|
|
users = a0.users;
|
|
value8 = _createForOfIteratorHelperLoose_20280Binding(users);
|
|
value9 = value8();
|
|
done = value9.done;
|
|
if (done) {
|
|
break reducibleJoin10;
|
|
}
|
|
r2 = value9;
|
|
reducibleLoop5: while (true) {
|
|
value10 = r2.value;
|
|
id = value10.id;
|
|
value11 = id in env1_16;
|
|
reducibleJoin7: while (true) {
|
|
if (value11) {
|
|
isIncompleteUser2 = isIncompleteUser(value10);
|
|
r1 = isIncompleteUser2;
|
|
break reducibleJoin7;
|
|
}
|
|
r1 = value11;
|
|
break reducibleJoin7;
|
|
}
|
|
reducibleJoin9: while (true) {
|
|
if (r1) {
|
|
break reducibleJoin9;
|
|
}
|
|
binding = env1_16;
|
|
id = value10.id;
|
|
prototype = UserRecord.prototype;
|
|
value12 = Object.create(prototype, {constructor: {value: UserRecord}});
|
|
userRecord = new UserRecord();
|
|
value13 = userRecord instanceof Object ? userRecord : value12;
|
|
binding[id] = value13;
|
|
break reducibleJoin9;
|
|
}
|
|
value14 = value8();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleJoin10;
|
|
}
|
|
r2 = value14;
|
|
continue reducibleLoop5;
|
|
}
|
|
}
|
|
const items2 = [a0.privateChannels];
|
|
items2[1] = a0.initialGuildChannels;
|
|
let length = items2.length;
|
|
value = 0;
|
|
if (value < length) {
|
|
r4 = value;
|
|
reducibleLoop11: while (true) {
|
|
value = _createForOfIteratorHelperLoose_20280(items2[r4]);
|
|
value16 = value();
|
|
done = value16.done;
|
|
if (!done) {
|
|
r8 = value16;
|
|
reducibleLoop12: while (true) {
|
|
value17 = r8.value;
|
|
rawRecipients = value17.rawRecipients;
|
|
reducibleJoin14: while (true) {
|
|
if (rawRecipients == null) {
|
|
break reducibleJoin14;
|
|
}
|
|
forEach = rawRecipients.forEach;
|
|
Reflect.apply(forEach, rawRecipients, [function(a0) {
|
|
return mergeUser(a0, false);
|
|
}]);
|
|
break reducibleJoin14;
|
|
}
|
|
value18 = value();
|
|
done = value18.done;
|
|
if (done) {
|
|
break reducibleLoop12;
|
|
}
|
|
r8 = value18;
|
|
continue reducibleLoop12;
|
|
}
|
|
}
|
|
value = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
|
|
length = items2.length;
|
|
if (value < length) {
|
|
r4 = value;
|
|
continue reducibleLoop11;
|
|
}
|
|
break reducibleLoop11;
|
|
}
|
|
}
|
|
}
|
|
|
|
function value_20408(a0) { // fn#20408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:19090, offset: 0x00ec5e73, size: 26 bytes, params: 2, frame: 2
|
|
var value;
|
|
if (a0 != null) {
|
|
value = environment.__proto__;
|
|
return env1_16[a0];
|
|
}
|
|
}
|
|
|
|
function value_20410(a0) { // fn#20410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:19209, offset: 0x00ec5e8d, size: 53 bytes, params: 2, frame: 19
|
|
var r6;
|
|
var propertyName;
|
|
var propertyName2;
|
|
for (propertyName in env1_16) {
|
|
if (a0(env1_16[propertyName]) !== false) {
|
|
r6 = propertyName2;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
function value_20411(a0, a1) { // fn#20411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:19291, offset: 0x00ec5ec2, size: 102 bytes, params: 3, frame: 18
|
|
var r6;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var property;
|
|
var username;
|
|
var discriminator;
|
|
var hasUniqueUsername;
|
|
const properties = Object.keys(env1_16);
|
|
const properties2 = 0;
|
|
const properties3 = properties.length;
|
|
if (properties !== undefined) {
|
|
r6 = properties2;
|
|
reducibleLoop1: while (true) {
|
|
propertyName = properties[r6];
|
|
propertyName2 = r6 + 1;
|
|
if (propertyName === undefined) {
|
|
return undefined;
|
|
}
|
|
property = env1_16[propertyName];
|
|
if (a1 != null) {
|
|
reducibleJoin5: while (true) {
|
|
if (property.username !== a0) {
|
|
break reducibleJoin5;
|
|
}
|
|
discriminator = property.discriminator;
|
|
if (discriminator === a1) {
|
|
return property;
|
|
}
|
|
break reducibleJoin5;
|
|
}
|
|
}
|
|
if (a1 != null) {
|
|
r6 = propertyName2;
|
|
continue reducibleLoop1;
|
|
}
|
|
username = property.username;
|
|
if (username !== a0) {
|
|
r6 = propertyName2;
|
|
continue reducibleLoop1;
|
|
}
|
|
hasUniqueUsername = property.hasUniqueUsername;
|
|
if (Reflect.apply(hasUniqueUsername, property, [])) {
|
|
return property;
|
|
}
|
|
r6 = propertyName2;
|
|
continue reducibleLoop1;
|
|
}
|
|
}
|
|
}
|
|
|
|
function value_20412(a0) { // fn#20412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:19481, offset: 0x00ec5f28, size: 96 bytes, params: 2, frame: 20
|
|
var environment;
|
|
var r5;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var property;
|
|
let value = a1;
|
|
const r1 = value !== undefined ? value : false;
|
|
const items2 = [];
|
|
value = environment.__proto__;
|
|
for (propertyName in env1_16) {
|
|
property = env1_16[propertyName];
|
|
if (!a0(property)) {
|
|
r5 = propertyName2;
|
|
continue;
|
|
}
|
|
items2.push(property);
|
|
r5 = propertyName2;
|
|
}
|
|
if (r1) {
|
|
items2.sort(function(a0, a1) {
|
|
var username = a0.username;
|
|
return username > a1.username ? 1 : a0.username < a1.username ? -1 : 0;
|
|
});
|
|
}
|
|
return items2;
|
|
}
|
|
|
|
function value_20414() { // fn#20414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:19667, offset: 0x00ec5fc4, size: 27 bytes, params: 1, frame: 10
|
|
const binding = env1_16;
|
|
const getId = AuthenticationStore.getId;
|
|
return binding[Reflect.apply(getId, AuthenticationStore, [])];
|
|
}
|
|
|
|
function _fun20293(a0) { // fn#20293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:5294, offset: 0x00ec43b9, size: 39 bytes, params: 2, frame: 13
|
|
var mergeUserBinding;
|
|
if (isNotCurrentUser(a0)) {
|
|
mergeUserBinding = mergeUser;
|
|
value = environment.__proto__;
|
|
mergeUserBinding(a0, require);
|
|
}
|
|
}
|
|
|
|
function _fun20299(a0) { // fn#20299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:6177, offset: 0x00ec45a7, size: 74 bytes, params: 2, frame: 17
|
|
const mergeGuildAvatarBinding = mergeGuildAvatar;
|
|
let user = a0.user;
|
|
let id = user.id;
|
|
mergeGuildAvatarBinding(id, env0_0.id, a0.avatar);
|
|
const mergeUserPrimaryGuildBinding = mergeUserPrimaryGuild;
|
|
user = a0.user;
|
|
id = user.id;
|
|
user = a0.user;
|
|
mergeUserPrimaryGuildBinding(id, user);
|
|
}
|
|
|
|
function _fun20322(a0) { // fn#20322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:7925, offset: 0x00ec4900, size: 24 bytes, params: 2, frame: 11
|
|
a0.forEach(function(a0) {
|
|
mergeUsersFromMessage(a0, true);
|
|
});
|
|
}
|
|
|
|
function _fun20324(a0) { // fn#20324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:7989, offset: 0x00ec492e, size: 110 bytes, params: 2, frame: 14
|
|
var recipients;
|
|
const type = a0.type;
|
|
const DM = ChannelTypes.DM;
|
|
if (!(type !== DM && a0.type !== ChannelTypes.GROUP_DM)) {
|
|
recipients = a0.recipients;
|
|
if (recipients != null) {
|
|
recipients.forEach(function(a0) {
|
|
return mergeUser(a0);
|
|
});
|
|
}
|
|
if (a0.recipient != null) {
|
|
mergeUser(a0.recipient);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun20345(a0, a1) { // fn#20345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:9890, offset: 0x00ec4dd4, size: 122 bytes, params: 3, frame: 18
|
|
const value = a0;
|
|
const user = env0_0.user;
|
|
return user.hasOwnProperty(a1) ? value || env0_1.set((require(22) /* metro dependency 22 */).camelCase(a1),
|
|
env0_0.user[a1]) !== env0_1 : value;
|
|
}
|
|
|
|
function _fun20357(a0, a1) { // fn#20357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:10783, offset: 0x00ec503b, size: 78 bytes, params: 3, frame: 17
|
|
const value = a0;
|
|
const mergeUserBinding = mergeUser;
|
|
let user = a1.user;
|
|
const value3 = mergeUserBinding(user);
|
|
const mergeGuildAvatarBinding = mergeGuildAvatar;
|
|
user = a1.user;
|
|
let r0 = mergeGuildAvatarBinding(user.id, env0_0.guildId, a1.avatar) || value3;
|
|
r0 = !r0 ? value : r0;
|
|
return r0;
|
|
}
|
|
|
|
function UserStoreCACHE_LOADED(a0) { // fn#20402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2005:14914, owner: UserStore.CACHE_LOADED, offset: 0x00ec5c40, size: 25 bytes, params: 2, frame: 11
|
|
return env0_0.handleLoadCache(a0);
|
|
}
|
|
|