aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-10-10 20:31:37 -0700
committerAdam Soltys <[email protected]>2024-10-10 20:31:37 -0700
commit2de34e3324e9ede75740b2e4beb984676623795d (patch)
tree364733891949e4ac1b8ea53a32ea2f97cb7dd7dd /lib
parent9edc16aa2d56ab5039cfb29cdfc1292da0ed6290 (diff)
downloadcoinos-server-2de34e3324e9ede75740b2e4beb984676623795d.tar.gz
coinos-server-2de34e3324e9ede75740b2e4beb984676623795d.zip
check relay tags
Diffstat (limited to 'lib')
-rw-r--r--lib/nostr.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/nostr.ts b/lib/nostr.ts
index 40dfc5f6..1fcea5c3 100644
--- a/lib/nostr.ts
+++ b/lib/nostr.ts
@@ -98,6 +98,7 @@ export let getRelays = async (pubkey): Promise<any> => {
read = [];
write = [];
for (let r of event.tags) {
+ if (r[0] !== "r") continue;
if (!r[2] || r[2] === "write") write.push(r[1]);
if (!r[2] || r[2] === "read") read.push(r[1]);
}