Skip to content

Commit

Permalink
fix: notification check
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Apr 9, 2024
1 parent f3a7bb8 commit 35a2576
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/NWCClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ export class NWCClient {
"#p": [this.publicKey],
},
]);
console.info("subscribed to relay", sub);
console.info("subscribed to relay");

sub.on("event", async (event) => {
const decryptedContent = await this.decrypt(
Expand All @@ -612,10 +612,10 @@ export class NWCClient {
console.error("Failed to parse decrypted event content", e);
return;
}
if (notification.result) {
if (notification.notification) {
onNotification(notification);
} else {
console.error("No result in response", notification);
console.error("No notification in response", notification);
}
});

Expand Down

0 comments on commit 35a2576

Please sign in to comment.