Fix marking events as seen in subscriptions when not matched
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@welshman/net",
|
||||
"version": "0.0.34",
|
||||
"version": "0.0.35",
|
||||
"author": "hodlbod",
|
||||
"license": "MIT",
|
||||
"description": "Utilities for connecting with nostr relays.",
|
||||
|
||||
@@ -166,9 +166,7 @@ export const optimizeSubscriptions = (subs: Subscription[]) => {
|
||||
|
||||
mergedSub.emitter.on(SubscriptionEvent.Event, (url: string, event: TrustedEvent) => {
|
||||
for (const sub of group) {
|
||||
const seen = sub.tracker.track(event.id, url)
|
||||
|
||||
if (!seen && matchFilters(sub.request.filters, event)) {
|
||||
if (matchFilters(sub.request.filters, event) && !sub.tracker.track(event.id, url)) {
|
||||
sub.emitter.emit(SubscriptionEvent.Event, url, event)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user