Skip to content

Commit

Permalink
Use validator pubkey and d tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
chmac committed Aug 11, 2024
1 parent 0d31eaf commit 6e9802b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/nostr/subscribe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,10 @@ async function backgroundNoteEventsFetching(onEventReceived) {
authors: TRUSTED_VALIDATION_PUBKEYS,
};
for await (const message of relayPool.req([filter])) {
const [messageType, subscriptionId, event] = message;
const [messageType, , event] = message;
if (messageType === "EVENT") {
const eventAuthorPublicKey = getPublicKeyFromEvent({ event });
const eventDTag = getTagFirstValueFromEvent({ event, tag: "d" });
const eventIdentifier = `${eventAuthorPublicKey}.${eventDTag}`;
const eventIdentifier = `${event.pubkey}.${eventDTag}`;
if (seenEventIdentifiers.has(eventIdentifier)) {
continue;
}
Expand Down

0 comments on commit 6e9802b

Please sign in to comment.