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",