fix: regression that dropped q tags from quote reposts

It looks like some refactor broke q tags on quote reposts. This drops
the gather_quote_tags entirely and just relies on the logic in
build_post.

The references field wasn't being used for anything other than pubkeys,
so we switch to pubkeys directly.

Changelog-Fixed: Fix quote repost counting
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-10-24 15:07:39 -07:00
parent d9f2317728
commit 5865b000c0
3 changed files with 15 additions and 49 deletions

View File

@@ -153,7 +153,13 @@ final class PostViewTests: XCTestCase {
XCTAssertNil(newManuallyEditedContent.attribute(.link, at: 11, effectiveRange: nil))
})
}
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 testMentionLinkEditorHandling_noWhitespaceAfterLink2_addsWhitespace() {
var content: NSMutableAttributedString