From c45e86149326a0524a06a3ca41ede8787f2c6998 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Wed, 19 Nov 2025 14:52:47 -0300 Subject: [PATCH] fire subscriptions. this was broken during the negentropy stuff. fixes https://github.com/nbd-wtf/nostr-tools/issues/517 --- abstract-relay.ts | 5 ++++- jsr.json | 2 +- package.json | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/abstract-relay.ts b/abstract-relay.ts index 90666c9..5246202 100644 --- a/abstract-relay.ts +++ b/abstract-relay.ts @@ -256,6 +256,7 @@ export class AbstractRelay { return false } + // shortcut EVENT sub const subid = getSubscriptionId(json) if (subid) { const so = this.openSubs.get(subid as string) @@ -411,7 +412,9 @@ export class AbstractRelay { filters: Filter[], params: Partial & { label?: string; id?: string }, ): Subscription { - return this.prepareSubscription(filters, params) + const sub = this.prepareSubscription(filters, params) + sub.fire() + return sub } public prepareSubscription( diff --git a/jsr.json b/jsr.json index 091fd99..a0116fc 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@nostr/tools", - "version": "2.17.3", + "version": "2.17.4", "exports": { ".": "./index.ts", "./core": "./core.ts", diff --git a/package.json b/package.json index 320f32f..9213c48 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "type": "module", "name": "nostr-tools", - "version": "2.17.3", + "version": "2.17.4", "description": "Tools for making a Nostr client.", "repository": { "type": "git",