Push shards into storage lib

This commit is contained in:
Jon Staab
2025-10-21 09:26:06 -07:00
parent ecbb3086d8
commit 5cbf69a8bd
6 changed files with 76 additions and 116 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ import {
uniqBy,
sortBy,
sort,
prop,
uniq,
nth,
pushToMapKey,
@@ -524,7 +525,7 @@ export const chats = derived(
c => -c.last_activity,
Array.from(messagesByChatId.entries()).map(([id, events]): Chat => {
const pubkeys = remove($pubkey!, splitChatId(id))
const messages = sortBy(e => -e.created_at, events)
const messages = sortBy(e => -e.created_at, uniqBy(prop("id"), events))
const last_activity = messages[0].created_at
const search_text =
pubkeys.length === 0