mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
fix: get zap recipient in gatherAuthors() function
this is needed to work correctly in notifications
This commit is contained in:
parent
af13614f1a
commit
9b66499df3
1 changed files with 7 additions and 1 deletions
|
|
@ -230,7 +230,13 @@ function gatherQuotes({ events, store, signal }: HydrateOpts): Promise<DittoEven
|
|||
|
||||
/** Collect authors from the events. */
|
||||
function gatherAuthors({ events, store, signal }: HydrateOpts): Promise<DittoEvent[]> {
|
||||
const pubkeys = new Set(events.map((event) => event.pubkey));
|
||||
const pubkeys = new Set(events.map((event) => {
|
||||
if (event.kind === 9735) {
|
||||
const pubkey = event.tags.find(([name]) => name === 'p')?.[1];
|
||||
if (pubkey) return pubkey;
|
||||
}
|
||||
return event.pubkey;
|
||||
}));
|
||||
|
||||
return store.query(
|
||||
[{ kinds: [0], authors: [...pubkeys], limit: pubkeys.size }],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue