mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-29 08:21:20 +00:00
Support q tags, stop reading kind 3
This commit is contained in:
parent
b33da91920
commit
36506fb296
@ -185,7 +185,7 @@ export const tagsFromContent = (content: string) => {
|
||||
}
|
||||
|
||||
if (type.match(/nostr:(note|nevent)/)) {
|
||||
tags.push(["e", value.id, value.relays?.[0] || "", "mention"])
|
||||
tags.push(["q", value.id, value.relays?.[0] || ""])
|
||||
}
|
||||
|
||||
if (type.match(/nostr:(nprofile|npub)/)) {
|
||||
|
@ -11,24 +11,6 @@ projections.addHandler(2, e => {
|
||||
saveRelay(normalizeRelayUrl(e.content))
|
||||
})
|
||||
|
||||
projections.addHandler(3, e => {
|
||||
saveRelayPolicy(
|
||||
e,
|
||||
tryJson<RelayPolicy[]>(() => {
|
||||
return Object.entries(JSON.parse(e.content || ""))
|
||||
.filter(([url]) => isShareableRelayUrl(url))
|
||||
.map(([url, conditions]) => {
|
||||
// @ts-ignore
|
||||
const write = ![false, "!"].includes(conditions.write)
|
||||
// @ts-ignore
|
||||
const read = ![false, "!"].includes(conditions.read)
|
||||
|
||||
return {url: normalizeRelayUrl(url), write, read}
|
||||
})
|
||||
}) as RelayPolicy[],
|
||||
)
|
||||
})
|
||||
|
||||
projections.addHandler(10002, e => {
|
||||
saveRelayPolicy(
|
||||
e,
|
||||
|
Loading…
Reference in New Issue
Block a user