From 6f396c825c45908698af343320db2a639e1028bd Mon Sep 17 00:00:00 2001 From: Kieran Date: Sat, 11 Nov 2023 13:31:38 +0000 Subject: [PATCH] fix: auth --- packages/system/src/nostr-system.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/system/src/nostr-system.ts b/packages/system/src/nostr-system.ts index 1e36fc50..0d6526b8 100644 --- a/packages/system/src/nostr-system.ts +++ b/packages/system/src/nostr-system.ts @@ -153,6 +153,7 @@ export class NostrSystem extends EventEmitter implements Syst c.on("eose", s => this.#onEndOfStoredEvents(c, s)); c.on("disconnect", code => this.#onRelayDisconnect(c, code)); c.on("connected", r => this.#onRelayConnected(c, r)); + c.on("auth", (c, r, cb) => this.emit("auth", c, r, cb)); await c.Connect(); } else { // update settings if already connected @@ -219,6 +220,7 @@ export class NostrSystem extends EventEmitter implements Syst c.on("eose", s => this.#onEndOfStoredEvents(c, s)); c.on("disconnect", code => this.#onRelayDisconnect(c, code)); c.on("connected", r => this.#onRelayConnected(c, r)); + c.on("auth", (c, r, cb) => this.emit("auth", c, r, cb)); await c.Connect(); return c; }