Fix comment tag values

This commit is contained in:
Jon Staab
2025-04-29 09:18:34 -07:00
parent 8ce0abbccd
commit ed10a620a7
5 changed files with 21 additions and 4 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@welshman/util",
"version": "0.2.0",
"version": "0.2.1",
"author": "hodlbod",
"license": "MIT",
"description": "A collection of nostr-related utilities.",
+1
View File
@@ -121,6 +121,7 @@ export const INBOX_RELAYS = 10050
export const FILE_SERVERS = 10096
export const LIGHTNING_PUB_RPC = 21000
export const CLIENT_AUTH = 22242
export const BLOSSOM_AUTH = 24242
export const AUTH_JOIN = 28934
export const AUTH_INVITE = 28935
export const WALLET_INFO = 13194
+1 -1
View File
@@ -62,7 +62,7 @@ export const getCommentTags = (tags: string[][]) => {
}
export const getCommentTagValues = (tags: string[][]) =>
mapVals(tags => tags.map(nth(1)), getCommentTags(tags))
mapVals(tags => tags.filter(t => ['a', 'e'].includes(t[0].toLowerCase())).map(nth(1)), getCommentTags(tags))
export const getReplyTags = (tags: string[][]) => {
const validTags = tags.filter(t => ["a", "e", "q"].includes(t[0]))