Compare commits
1 Commits
profile-na
...
quote-q-ta
| Author | SHA1 | Date | |
|---|---|---|---|
|
fab0e5de29
|
@@ -883,6 +883,8 @@ func build_post(state: DamusState, post: NSAttributedString, action: PostAction,
|
||||
case .quoting(let ev):
|
||||
content.append("\n\nnostr:" + bech32_note_id(ev.id))
|
||||
|
||||
tags.append(["q", ev.id.hex()]);
|
||||
|
||||
if let quoted_ev = state.events.lookup(ev.id) {
|
||||
tags.append(["p", quoted_ev.pubkey.hex()])
|
||||
}
|
||||
|
||||
@@ -170,6 +170,12 @@ final class PostViewTests: XCTestCase {
|
||||
|
||||
nonAlphaNumerics.forEach { testAddingStringAfterLink(str: $0)}
|
||||
}
|
||||
|
||||
func testQuoteRepost() {
|
||||
let post = build_post(state: test_damus_state, post: .init(), action: .quoting(test_note), uploadedMedias: [], pubkeys: [])
|
||||
|
||||
XCTAssertEqual(post.tags, [["q", test_note.id.hex()]])
|
||||
}
|
||||
}
|
||||
|
||||
func checkMentionLinkEditorHandling(
|
||||
|
||||
Reference in New Issue
Block a user