nip10: marker replies

This should drastically increase compatibility for damus replies in
other clients.

Also filter non-pubkey references when replying so we don't run into the
q-tag bug.

Changelog-Added: Added nip10 marker replies
Changelog-Fixed: Fixed issue where some replies were including the q tag
Fixes: https://github.com/damus-io/damus/issues/2239
Fixes: https://github.com/damus-io/damus/issues/2233
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-05-09 13:33:04 -07:00
parent 0b199a18b4
commit 514a053dce
10 changed files with 231 additions and 28 deletions

View File

@@ -341,8 +341,11 @@ extension NdbNote {
}
func event_refs(_ keypair: Keypair) -> [EventRef] {
let refs = interpret_event_refs_ndb(blocks: self.blocks(keypair).blocks, tags: self.tags)
return refs
return interpret_event_refs_ndb(blocks: self.blocks(keypair).blocks, tags: self.tags)
}
func thread_reply(_ keypair: Keypair) -> ThreadReply? {
ThreadReply(event_refs: event_refs(keypair))
}
func get_content(_ keypair: Keypair) -> String {