diff --git a/src/storages/hydrate.ts b/src/storages/hydrate.ts index 60bd729f..d80c2f46 100644 --- a/src/storages/hydrate.ts +++ b/src/storages/hydrate.ts @@ -99,7 +99,7 @@ export function assembleEvents( } if (event.kind === 7) { - const id = event.tags.find(([name]) => name === 'e')?.[1]; + const id = event.tags.findLast(([name]) => name === 'e')?.[1]; if (id) { event.reacted = b.find((e) => matchFilter({ kinds: [1], ids: [id] }, e)); } @@ -154,7 +154,7 @@ function gatherReacted({ events, store, signal }: HydrateOpts): Promise name === 'e')?.[1]; + const id = event.tags.findLast(([name]) => name === 'e')?.[1]; if (id) { ids.add(id); }