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

@@ -192,7 +192,7 @@ class damusTests: XCTestCase {
*/
func testMakeHashtagPost() {
let post = NostrPost(content: "#damus some content #bitcoin derp #かっこいい wow", references: [])
let post = NostrPost(content: "#damus some content #bitcoin derp #かっこいい wow", tags: [])
let ev = post_to_event(post: post, keypair: test_keypair_full)!
XCTAssertEqual(ev.tags.count, 3)
@@ -269,7 +269,7 @@ class damusTests: XCTestCase {
}
private func createEventFromContentString(_ content: String) -> NostrEvent {
let post = NostrPost(content: content, references: [])
let post = NostrPost(content: content, tags: [])
guard let ev = post_to_event(post: post, keypair: test_keypair_full) else {
XCTFail("Could not create event")
return test_note