mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
fire subscriptions.
this was broken during the negentropy stuff. fixes https://github.com/nbd-wtf/nostr-tools/issues/517
This commit is contained in:
@@ -256,6 +256,7 @@ export class AbstractRelay {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// shortcut EVENT sub
|
||||||
const subid = getSubscriptionId(json)
|
const subid = getSubscriptionId(json)
|
||||||
if (subid) {
|
if (subid) {
|
||||||
const so = this.openSubs.get(subid as string)
|
const so = this.openSubs.get(subid as string)
|
||||||
@@ -411,7 +412,9 @@ export class AbstractRelay {
|
|||||||
filters: Filter[],
|
filters: Filter[],
|
||||||
params: Partial<SubscriptionParams> & { label?: string; id?: string },
|
params: Partial<SubscriptionParams> & { label?: string; id?: string },
|
||||||
): Subscription {
|
): Subscription {
|
||||||
return this.prepareSubscription(filters, params)
|
const sub = this.prepareSubscription(filters, params)
|
||||||
|
sub.fire()
|
||||||
|
return sub
|
||||||
}
|
}
|
||||||
|
|
||||||
public prepareSubscription(
|
public prepareSubscription(
|
||||||
|
|||||||
2
jsr.json
2
jsr.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nostr/tools",
|
"name": "@nostr/tools",
|
||||||
"version": "2.17.3",
|
"version": "2.17.4",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./index.ts",
|
".": "./index.ts",
|
||||||
"./core": "./core.ts",
|
"./core": "./core.ts",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"name": "nostr-tools",
|
"name": "nostr-tools",
|
||||||
"version": "2.17.3",
|
"version": "2.17.4",
|
||||||
"description": "Tools for making a Nostr client.",
|
"description": "Tools for making a Nostr client.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
Reference in New Issue
Block a user