decord/beta/source/modules/messages/useLongestChannelMessageBeforeReply.tsx
github-actions 84d017ff78 chore: update source for beta 348.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5021.js (118.4 MB)
2026-09-28 16:18:32 +00:00

47 lines
1.5 KiB
TypeScript

// Module ID: 11943
// Function ID: 11944
// Name: useLongestChannelMessageBeforeReply
// Dependencies: [5056, 504, 2]
// Exports: useLongestChannelMessageBeforeReply
// Module 11943 (useLongestChannelMessageBeforeReply)
import MessageStore from "MessageStore" /* 5056 */;
const require = globalThis.__r;
const require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/messages/useLongestChannelMessageBeforeReply.tsx");
export const useLongestChannelMessageBeforeReply = function useLongestChannelMessageBeforeReply(id, recipientId) {
_require = id;
dependencyMap = recipientId;
const items = [MessageStore];
const items1 = [id, recipientId];
return require("initialize").useStateFromStores(items, () => {
if (null != closure_1) {
const messages = MessageStore.getMessages(closure_0);
const findOldestResult = messages.findOldest((author) => author.author.id === recipientId);
let tmp4 = findOldestResult;
if (null != findOldestResult) {
const toArrayResult = messages.toArray();
for (const item10018 of toArrayResult) {
if (item10018.author.id !== closure_1) {
obj2.return();
break;
} else {
let length;
if (tmp4 != null) {
length = tmp4.content.length;
}
if (tmp8.content.length > length) {
tmp4 = item10018;
}
continue;
}
return tmp4;
}
}
}
}, items1);
};