Compare commits
1 Commits
quote-q-ta
...
profile-na
| Author | SHA1 | Date | |
|---|---|---|---|
|
0b85b53eda
|
@@ -883,8 +883,6 @@ 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()])
|
||||
}
|
||||
|
||||
@@ -67,7 +67,9 @@ struct ProfileName: View {
|
||||
}
|
||||
|
||||
func name_choice(profile: Profile?) -> String {
|
||||
return prefix == "@" ? current_display_name(profile: profile).username.truncate(maxLength: 50) : current_display_name(profile: profile).displayName.truncate(maxLength: 50)
|
||||
let displayName = current_display_name(profile: profile)
|
||||
let untruncatedName = prefix == "@" ? displayName.username : displayName.displayName
|
||||
return untruncatedName.truncate(maxLength: 50)
|
||||
}
|
||||
|
||||
func onlyzapper(profile: Profile?) -> Bool {
|
||||
|
||||
@@ -170,12 +170,6 @@ 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