feat: sync relay sets
This commit is contained in:
parent
4343765aba
commit
7bd5b915eb
38 changed files with 1069 additions and 686 deletions
|
|
@ -64,6 +64,18 @@ export function getUsingClient(event: Event) {
|
|||
return event.tags.find(tagNameEquals('client'))?.[1]
|
||||
}
|
||||
|
||||
export function getFollowingsFromFollowListEvent(event: Event) {
|
||||
return Array.from(
|
||||
new Set(
|
||||
event.tags
|
||||
.filter(tagNameEquals('p'))
|
||||
.map(([, pubkey]) => pubkey)
|
||||
.filter(Boolean)
|
||||
.reverse()
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
export async function extractMentions(content: string, parentEvent?: Event) {
|
||||
const pubkeySet = new Set<string>()
|
||||
const relatedEventIdSet = new Set<string>()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue