fire subscriptions.

this was broken during the negentropy stuff.

fixes https://github.com/nbd-wtf/nostr-tools/issues/517
This commit is contained in:
fiatjaf
2025-11-19 14:52:47 -03:00
parent 66cc55c7f0
commit c45e861493
3 changed files with 6 additions and 3 deletions

View File

@@ -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<SubscriptionParams> & { label?: string; id?: string },
): Subscription {
return this.prepareSubscription(filters, params)
const sub = this.prepareSubscription(filters, params)
sub.fire()
return sub
}
public prepareSubscription(

View File

@@ -1,6 +1,6 @@
{
"name": "@nostr/tools",
"version": "2.17.3",
"version": "2.17.4",
"exports": {
".": "./index.ts",
"./core": "./core.ts",

View File

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