SQLite-backed notifications, WoT profile fix, reaction queue fix

Notifications now load instantly from SQLite on startup instead of
waiting for relay responses. New events merge in as they arrive.
Read state persists in DB across restarts.

Also: filter profile owner from WoT followers list, make "+N more"
clickable to expand, fix reaction throttle queue jamming on errors.
This commit is contained in:
Jure
2026-03-29 16:12:36 +02:00
parent 2c17361e50
commit 4cc844df28
6 changed files with 301 additions and 119 deletions

View File

@@ -24,12 +24,18 @@ function throttledFetch(eventId: string, pubkey?: string): Promise<GroupedReacti
const promise = new Promise<GroupedReactions>((resolve) => {
const doFetch = () => {
activeCount++;
fetchReactions(eventId, pubkey).then((result) => {
activeCount--;
pending.delete(eventId);
resolve(result);
runNext();
});
fetchReactions(eventId, pubkey)
.then((result) => {
resolve(result);
})
.catch(() => {
resolve({ groups: new Map(), myReactions: new Set(), total: 0 });
})
.finally(() => {
activeCount--;
pending.delete(eventId);
runNext();
});
};
if (activeCount < MAX_CONCURRENT) {