nostr-tools
Advanced tools
Comparing version 0.10.0 to 0.10.1
{ | ||
"name": "nostr-tools", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"description": "Tools for making a Nostr client.", | ||
@@ -5,0 +5,0 @@ "repository": { |
11
relay.js
import 'websocket-polyfill' | ||
import {verifySignature} from './event' | ||
import {matchFilters} from './filter' | ||
@@ -91,6 +92,8 @@ export function normalizeRelayURL(url) { | ||
if (await verifySignature(event)) { | ||
if (channels[channel]) { | ||
channels[channel](event) | ||
} | ||
if ( | ||
(await verifySignature(event)) && | ||
channels[channel] && | ||
matchFilters(openSubs[channel], event) | ||
) { | ||
channels[channel](event) | ||
} | ||
@@ -97,0 +100,0 @@ return |
19635
578