Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,706 @@
/* Metro module 6898; source: modules/threads/ThreadMessageStore.tsx; dependencies: [6, 7, 15, 17, 18, 1383, 3794, 1885, 1379, 4814, 1243, 661, 22, 21, 4625, 566, 694, 2] */
function _fun54822(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:6, offset: 0x0136ee18, size: 700 bytes, params: 8, frame: 24
let env0_0 = require;
const _arrayLikeToArray_54828 = 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 updateFromThreadMessages = function(a0) {
var value2;
var env0_0 = a0;
if (a0.type !== MessageTypes.THREAD_STARTER_MESSAGE) {
value2 = ChannelStore.getChannel(a0.channel_id);
if (value2 != null) {
updateState(value2, _fun54833);
}
}
};
const updateFromThread = function(a0) {
var env0_0 = a0;
updateState(a0, _fun54835);
};
const closure = function({channel}) {
updateFromThread(channel);
};
const closure2 = function({threads}) {
threads.forEach(updateFromServerThread);
};
const closure3 = function({data}) {
data.forEach(_fun54840);
};
const closure4 = RELATIONSHIP_ADD_54843;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const channelRecordModule = require(1383) /* metro dependency 1383: ChannelRecord */;
const env0_8 = channelRecordModule.ALL_CHANNEL_TYPES;
const env0_9 = channelRecordModule.THREAD_CHANNEL_TYPES;
const messageRecord = importDefault(3794) /* metro dependency 3794: MessageRecord */;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
const env0_14 = (require(1243) /* metro dependency 1243: ThreadConstants */).MAX_THREAD_MESSAGE_COUNT;
const env0_15 = (require(661) /* metro dependency 661: Constants */).MessageTypes;
const Set = global.Set;
let set = new Set();
const env0_17 = {};
const env0_18 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun54844(Store).displayName = 'ThreadMessageStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: CONNECTION_OPEN_54851,
OVERLAY_INITIALIZE: OVERLAY_INITIALIZE_54852, GUILD_CREATE: function({guild}) {
updateFromGuild(guild);
}, GUILD_DELETE: function(a0) {
_fun54855(a0.guild.id);
}, THREAD_CREATE: closure, THREAD_UPDATE: closure, THREAD_LIST_SYNC: function({threads, mostRecentMessages}) {
threads.forEach(updateFromThread);
if (mostRecentMessages != null) {
mostRecentMessages.forEach(_fun54858);
}
}, LOAD_THREADS_SUCCESS: closure2, LOAD_ARCHIVED_THREADS_SUCCESS: closure2, RELATIONSHIP_ADD: closure4,
RELATIONSHIP_UPDATE: closure4, RELATIONSHIP_REMOVE: closure4, SEARCH_MESSAGES_SUCCESS: closure3,
MOD_VIEW_SEARCH_MESSAGES_SUCCESS: closure3, THREAD_DELETE: THREAD_DELETE_54860, CHANNEL_DELETE: function(a0) {
_fun54862(a0.channel.id);
}, MESSAGE_CREATE: MESSAGE_CREATE_54864, MESSAGE_UPDATE: MESSAGE_UPDATE_54866, MESSAGE_DELETE: MESSAGE_DELETE_54868,
MESSAGE_DELETE_BULK: MESSAGE_DELETE_BULK_54870, LOAD_MESSAGES_SUCCESS: LOAD_MESSAGES_SUCCESS_54874});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/ThreadMessageStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_54823() { // fn#54823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:310, offset: 0x0136f0d4, 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_54823_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_54826(a0, a1) { // fn#54826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:503, offset: 0x0136f132, 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 _fun54827;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_54828(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_54828(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_54828(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun54827;
}
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 updateState(a0, a1) { // fn#54829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:1437, offset: 0x0136f2a4, size: 145 bytes, params: 3, frame: 19
var updateWithStateBinding;
var id;
var binding;
if (ALL_CHANNEL_TYPES.has(a0.type)) {
updateWithStateBinding = updateWithState;
id = a0.id;
if (!(id in env0_17)) {
env0_17[a0.id] = {guildId: a0.guild_id, parentId: a0.parent_id, count: a0.messageCount ?? 0,
mostRecentRawMessage: null, mostRecentMessage: null};
}
binding = env0_17;
id = a0.id;
updateWithStateBinding(binding[id], a1);
}
}
function updateWithState(a0, a1) { // fn#54830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:1690, offset: 0x0136f335, size: 67 bytes, params: 3, frame: 13
env0_18[a0.parentId] = (env0_18[a0.parentId] ?? 0) + 1;
a1(a0);
}
function updateFromGuild({threads, threadMessages}) { // fn#54831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:1781, offset: 0x0136f378, size: 63 bytes, params: 2, frame: 13
if (threads != null) {
threads.forEach(updateFromThread);
}
if (threadMessages != null) {
threadMessages.forEach(updateFromThreadMessages);
}
}
function updateFromThreadMessages(a0) { // fn#54832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:1930, offset: 0x0136f3b7, size: 77 bytes, params: 2, frame: 14
var value2;
const env0_0 = a0;
const type = a0.type;
const THREAD_STARTER_MESSAGE = MessageTypes.THREAD_STARTER_MESSAGE;
if (type !== THREAD_STARTER_MESSAGE) {
value2 = ChannelStore.getChannel(a0.channel_id);
if (value2 != null) {
updateState(value2, _fun54833);
}
}
}
function updateFromThread(a0) { // fn#54834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:2120, offset: 0x0136f420, size: 31 bytes, params: 2, frame: 13
const env0_0 = a0;
updateState(a0, _fun54835);
}
function updateFromServerThread(a0) { // fn#54836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:2404, offset: 0x0136f4b5, size: 70 bytes, params: 2, frame: 13
if (a0 == null) {
return false;
}
if (a0.id in env0_17) {
return false;
}
const channel = ChannelStore.getChannel(a0.id);
if (channel == null) {
return false;
}
updateFromThread(channel);
return true;
}
function MOD_VIEW_SEARCH_MESSAGES_SUCCESS_54839({data}) { // fn#54839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:2698, offset: 0x0136f531, size: 29 bytes, params: 2, frame: 11
data.forEach(function({messages, threads}) {
messages.forEach(_fun54841);
threads.forEach(updateFromServerThread);
});
}
function RELATIONSHIP_ADD_54843() { // fn#54843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:2889, offset: 0x0136f5b4, size: 102 bytes, params: 1, frame: 23
var r6;
var propertyName;
var propertyName2;
var property;
var mostRecentMessage;
var getMessage;
var id;
var value2;
for (propertyName in env0_17) {
property = env0_17[propertyName];
if (property == null) {
r6 = propertyName2;
continue;
}
mostRecentMessage = property.mostRecentMessage;
if (mostRecentMessage == null) {
r6 = propertyName2;
continue;
}
getMessage = MessageStore.getMessage;
mostRecentMessage = property.mostRecentMessage;
id = mostRecentMessage.id;
value2 = Reflect.apply(getMessage, MessageStore, [propertyName, id]);
if (value2 == null) {
r6 = propertyName2;
continue;
}
property.mostRecentMessage = value2;
r6 = propertyName2;
}
}
function _fun54844(a0) { // fn#54844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:3086, offset: 0x0136f61a, size: 164 bytes, params: 2, frame: 16
const closure = ThreadMessageStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, MessageStore);
}}, {key: 'getCount', value: value_54847}, {key: 'getMostRecentMessage', value: value_54848},
{key: 'getChannelThreadsVersion', value: value_54849}, {key: 'getInitialOverlayState', value: value_54850}]);
}
function CONNECTION_OPEN_54851({guilds}) { // fn#54851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:4094, offset: 0x0136f7a1, size: 50 bytes, params: 2, frame: 11
env0_18 = {};
env0_16.clear();
guilds.forEach(updateFromGuild);
}
function OVERLAY_INITIALIZE_54852({threadMessages}) { // fn#54852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:4196, offset: 0x0136f7d3, size: 161 bytes, params: 2, frame: 24
var r14;
var r5;
var propertyName;
var propertyName2;
var mostRecentMessage;
var property;
var object3;
var author;
var prototype;
var value2;
var userRecord;
var value3;
var value4;
var messageRecord;
var value5;
const object4 = {};
copyDataProperties(object4, threadMessages, r14);
for (propertyName in object4) {
mostRecentMessage = threadMessages[propertyName].mostRecentMessage;
if (mostRecentMessage == null) {
r5 = propertyName2;
continue;
}
property = threadMessages[propertyName];
object3 = {};
copyDataProperties(object3, mostRecentMessage, r14);
author = mostRecentMessage.author;
prototype = UserRecord.prototype;
value2 = Object.create(prototype, {constructor: {value: UserRecord}});
userRecord = new UserRecord();
value3 = userRecord instanceof Object ? userRecord : value2;
object3['author'] = value3;
prototype = MessageRecord.prototype;
value4 = Object.create(prototype, {constructor: {value: MessageRecord}});
messageRecord = new MessageRecord();
value5 = messageRecord instanceof Object ? messageRecord : value4;
property.mostRecentMessage = value5;
r5 = propertyName2;
r14 = UserRecord;
}
}
function GUILD_DELETE_54854({guild}) { // fn#54854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:4458, offset: 0x0136f88c, size: 29 bytes, params: 2, frame: 11
GUILD_DELETE_54854DeleteForGuild(guild.id);
}
function THREAD_LIST_SYNC_54857({threads, mostRecentMessages}) { // fn#54857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:4712, offset: 0x0136f90f, size: 59 bytes, params: 2, frame: 12
threads.forEach(updateFromThread);
if (mostRecentMessages != null) {
mostRecentMessages.forEach(function(a0) {
var env0_0 = a0;
var value2 = ChannelStore.getChannel(a0.channel_id);
if (value2 != null && a0.type !== MessageTypes.THREAD_STARTER_MESSAGE) {
updateState(value2, _fun54859);
}
});
}
}
function THREAD_DELETE_54860({channel}) { // fn#54860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:5357, offset: 0x0136f99d, size: 28 bytes, params: 2, frame: 2
delete env0_17[channel.id];
}
function CHANNEL_DELETE_54861({channel}) { // fn#54861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:5429, offset: 0x0136f9b9, size: 29 bytes, params: 2, frame: 11
CHANNEL_DELETE_54861DeleteForChannel(channel.id);
}
function MESSAGE_CREATE_54864({message, optimistic, isPushNotification, sendMessageOptions}) { // fn#54864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:5577, offset: 0x0136fa1b, size: 235 bytes, params: 2, frame: 19
var r4;
var r0;
var value6;
var isForumPost2;
var id;
var defaultImport;
var updateStateBinding;
if (optimistic) {
return false;
}
if (isPushNotification) {
return false;
}
if (sendMessageOptions != null) {
return false;
}
var value;
const channel = ChannelStore.getChannel(message.channel_id);
let r1 = channel == null || !THREAD_CHANNEL_TYPES.has(channel.type);
if (r1) {
r0 = !r1;
} else {
value6 = message.type !== MessageTypes.THREAD_STARTER_MESSAGE;
if (value6) {
isForumPost2 = channel.isForumPost();
if (isForumPost2) {
id = message.id;
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r1 = id !== defaultImport.castChannelIdAsMessageId(channel.id);
} else {
r1 = !isForumPost2;
}
r4 = r1;
} else {
r4 = value6;
}
if (r4) {
updateStateBinding = updateState;
value = undefined;
updateStateBinding(channel, _fun54865);
r1 = value;
} else {
r1 = !!r4;
}
r0 = r1;
}
return r0;
}
function MESSAGE_UPDATE_54866({message}) { // fn#54866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:6043, offset: 0x0136fb4e, size: 114 bytes, params: 2, frame: 18
const property = env0_17[message.channel_id];
const r5 = property?.mostRecentRawMessage ?? property?.mostRecentMessage;
if (property == null) {
return false;
}
if (r5 == null) {
return false;
}
if (r5.id !== message.id) {
return false;
}
updateWithState(property, _fun54867);
}
function MESSAGE_DELETE_54868({id, channelId}) { // fn#54868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:6493, offset: 0x0136fc4d, size: 127 bytes, params: 2, frame: 18
const property = env0_17[channelId];
if (property == null) {
return false;
}
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const env0_1 = defaultImport.castChannelIdAsMessageId(channelId) !== id;
const binding = env0_16;
const env0_2 = !binding.has(id);
updateWithState(property, _fun54869);
}
function MESSAGE_DELETE_BULK_54870({ids, channelId}) { // fn#54870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:6868, offset: 0x0136fd5f, size: 98 bytes, params: 2, frame: 16
const property = env0_17[channelId];
if (property == null) {
return false;
}
if (ids.filter(_fun54871).length > 0) {
updateWithState(property, _fun54872);
}
}
function LOAD_MESSAGES_SUCCESS_54874(a0) { // fn#54874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:7289, offset: 0x0136fe92, size: 190 bytes, params: 2, frame: 20
var r6;
var r7;
var r9;
var r0;
var updateFromServerThreadBinding;
var value5;
var thread;
var value6;
var value7;
const env0_0 = a0;
const value2 = _createForOfIteratorHelperLoose_54826(a0.messages);
const value3 = value2();
let done = value3.done;
const value4 = false;
if (done) {
r0 = value4;
} else {
r6 = value4;
r7 = value3;
while (true) {
updateFromServerThreadBinding = updateFromServerThread;
value5 = r7.value;
thread = value5.thread;
value6 = updateFromServerThreadBinding(thread);
r9 = value6 || r6;
value7 = value2();
done = value7.done;
if (done) {
r0 = r9;
break;
}
r6 = r9;
r7 = value7;
continue;
}
}
if (!a0.isAfter) {
if (a0.isBefore) {
return r0;
}
if (a0.hasMoreAfter) {
return r0;
}
var channel = ChannelStore.getChannel(a0.channelId);
if (channel == null) {
return r0;
}
if (THREAD_CHANNEL_TYPES.has(channel.type)) {
updateState(channel, _fun54875);
return undefined;
}
}
return r0;
}
function _fun54833(a0) { // fn#54833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:2062, offset: 0x0136f404, size: 28 bytes, params: 2, frame: 2
a0.mostRecentRawMessage = env0_0;
a0.mostRecentMessage = null;
}
function _fun54835(a0) { // fn#54835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:2164, offset: 0x0136f43f, size: 118 bytes, params: 2, frame: 7
if (env0_0.messageCount != null) {
a0.count = env0_0.messageCount;
}
if (env0_0.lastMessageId != null && (a0.mostRecentRawMessage ?? a0.mostRecentMessage)?.id !== env0_0.lastMessageId) {
a0.mostRecentRawMessage = null;
a0.mostRecentMessage = null;
}
}
function _fun54840({messages, threads}) { // fn#54840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:2756, offset: 0x0136f54e, size: 53 bytes, params: 2, frame: 12
messages.forEach(function(a0) {
a0.forEach(_fun54842);
});
threads.forEach(updateFromServerThread);
}
function value_54847(a0) { // fn#54847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:3459, offset: 0x0136f6dc, size: 44 bytes, params: 2, frame: 4
let value = environment.__proto__;
const property = env1_17[a0];
value = null;
const count = value == property ? undefined : property.count;
return value != count ? count : value;
}
function value_54848(a0) { // fn#54848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:3569, offset: 0x0136f708, size: 153 bytes, params: 2, frame: 16
var value5;
let value = environment.__proto__;
const property = env1_17[a0];
const value2 = null;
if (value2 == property) {
return value2;
}
let mostRecentMessage = property.mostRecentMessage;
let r2 = value2 == mostRecentMessage && value2 != property.mostRecentRawMessage;
if (r2) {
value5 = MessageStore.getMessage(a0, property.mostRecentRawMessage.id);
if (value2 != value5) {
r2 = value5;
} else {
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
value = value.createMessageRecord(property.mostRecentRawMessage);
r2 = value;
}
property.mostRecentMessage = r2;
property.mostRecentRawMessage = value2;
}
mostRecentMessage = property.mostRecentMessage;
return value2 != mostRecentMessage ? mostRecentMessage : value2;
}
function GUILD_DELETE_54854DeleteForGuild(a0) { // fn#54855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:4497, owner: GUILD_DELETE_54854.deleteForGuild, offset: 0x0136f8a9, size: 61 bytes, params: 2, frame: 15
const env0_0 = a0;
const defaultImport = importDefault(22) /* metro dependency 22 */;
env1_17 = defaultImport.omitBy(env1_17, _fun54856);
}
function _fun54858(a0) { // fn#54858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:4824, offset: 0x0136f94a, size: 83 bytes, params: 2, frame: 15
const env0_0 = a0;
const channel = ChannelStore.getChannel(a0.channel_id);
if (channel != null && a0.type !== MessageTypes.THREAD_STARTER_MESSAGE) {
updateState(channel, _fun54859);
}
}
function CHANNEL_DELETE_54861DeleteForChannel(a0) { // fn#54862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:5472, owner: CHANNEL_DELETE_54861.deleteForChannel, offset: 0x0136f9d6, size: 69 bytes, params: 2, frame: 16
const env0_0 = a0;
const defaultImport = importDefault(22) /* metro dependency 22 */;
env1_17 = defaultImport.omitBy(env1_17, _fun54863);
delete env1_18[a0];
}
function _fun54865(a0) { // fn#54865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:5939, offset: 0x0136fb06, size: 72 bytes, params: 2, frame: 14
const Math = global.Math;
a0.count = Math.min(a0.count + 1, MAX_THREAD_MESSAGE_COUNT);
a0.mostRecentRawMessage = message;
a0.mostRecentMessage = null;
}
function _fun54867(a0) { // fn#54867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:6257, offset: 0x0136fbc0, size: 141 bytes, params: 2, frame: 15
var value;
if (a0.mostRecentMessage != null) {
value = environment.__proto__;
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
a0.mostRecentMessage = value.updateMessageRecord(a0.mostRecentMessage, message);
}
if (a0.mostRecentRawMessage != null) {
value = environment.__proto__;
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
a0.mostRecentRawMessage = value.updateServerMessage(a0.mostRecentRawMessage, message);
}
}
function _fun54869(a0) { // fn#54869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:6651, offset: 0x0136fccc, size: 147 bytes, params: 2, frame: 16
const r3 = a0.mostRecentRawMessage ?? a0.mostRecentMessage;
if (r3 != null && r3.id === id) {
a0.mostRecentMessage = null;
a0.mostRecentRawMessage = null;
}
a0.count = env0_1 && env0_2 ? global.Math.max(a0.count - 1, 0) : a0.count;
const binding = env1_16;
binding.add(id);
}
function _fun54871(a0) { // fn#54871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:6969, offset: 0x0136fdc1, size: 75 bytes, params: 2, frame: 13
const value = environment.__proto__;
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const value3 = defaultImport.castChannelIdAsMessageId(channelId) !== a0;
const binding = env1_16;
return value3 && !binding.has(a0);
}
function _fun54872(a0) { // fn#54872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:7078, offset: 0x0136fe0c, size: 112 bytes, params: 2, frame: 14
const r3 = a0.mostRecentRawMessage ?? a0.mostRecentMessage;
if (r3 != null && ids.includes(r3.id)) {
a0.mostRecentMessage = null;
a0.mostRecentRawMessage = null;
}
a0.count = a0.count - length;
ids.forEach(_fun54873);
}
function _fun54875(a0) { // fn#54875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:7581, offset: 0x0136ff50, size: 164 bytes, params: 2, frame: 7
var r3;
var property;
var value2;
let messages = env0_0.messages;
let length = messages.length;
if (length === 0) {
a0.mostRecentRawMessage = null;
a0.mostRecentMessage = null;
a0.count = 0;
} else {
messages = env0_0.messages;
property = messages[0];
value2 = null;
r3 = value2 != property ? property : value2;
messages = env0_0.messages;
length = messages.length;
value = environment.__proto__;
a0.count = length >= MAX_THREAD_MESSAGE_COUNT ? MAX_THREAD_MESSAGE_COUNT : a0.count;
if ((value2 == r3 ? undefined : r3.type) !== MessageTypes.THREAD_STARTER_MESSAGE) {
a0.mostRecentRawMessage = r3;
a0.mostRecentMessage = value2;
}
}
}
function _fun54841(a0) { // fn#54841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:2794, offset: 0x0136f583, size: 24 bytes, params: 2, frame: 11
a0.forEach(function(a0) {
updateFromServerThread(a0.thread);
});
}
function _fun54856(a0) { // fn#54856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:4545, offset: 0x0136f8e6, size: 41 bytes, params: 2, frame: 3
var value2;
const guildId = a0.guildId;
const value = guildId === env0_0;
if (value) {
value2 = environment.__proto__.__proto__;
delete env2_18[a0.parentId];
}
return value;
}
function _fun54873(a0) { // fn#54873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7076:7249, offset: 0x0136fe7c, size: 22 bytes, params: 2, frame: 11
return env2_16.add(a0);
}