mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
refactor: remove duplicate filter
This commit is contained in:
parent
05a4a5a5c9
commit
c82cfb9e8b
1 changed files with 2 additions and 3 deletions
|
|
@ -132,9 +132,8 @@ export function assembleEvents(
|
|||
event.quote = b.find((e) => matchFilter({ kinds: [1, 20], ids: [id] }, e));
|
||||
}
|
||||
|
||||
const pubkeys = event.tags.filter(([name]) => name === 'p')
|
||||
.map(([_name, value]) => value)
|
||||
.filter((pubkey) => isNostrId(pubkey));
|
||||
const pubkeys = event.tags.filter(([name, value]) => name === 'p' && isNostrId(value))
|
||||
.map(([_name, value]) => value);
|
||||
event.mentions = b.filter((e) => matchFilter({ kinds: [0], authors: pubkeys }, e));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue