Fix relay profile loading, add getTopicTags, allow mapping events to multiple items

This commit is contained in:
Jon Staab
2024-09-11 09:15:03 -07:00
parent bece689530
commit 4e113faa1a
7 changed files with 62 additions and 40 deletions
+4
View File
@@ -195,6 +195,10 @@ export const getPubkeyTags = (tags: string[][]) =>
export const getPubkeyTagValues = (tags: string[][]) => getPubkeyTags(tags).map(nth(1))
export const getTopicTags = (tags: string[][]) => tags.filter(t => ["t"].includes(t[0]))
export const getTopicTagValues = (tags: string[][]) => getTopicTags(tags).map(nth(1))
export const getRelayTags = (tags: string[][]) =>
tags.filter(t => ["r", "relay"].includes(t[0]) && isRelayUrl(t[1]))