From 3bf7ea4c0cba64b65df304cec274e5c8e23b6566 Mon Sep 17 00:00:00 2001 From: cr0bar Date: Sat, 8 Jul 2023 20:54:55 +0100 Subject: [PATCH] Update to PostView.swift to fix broken nostr link Fix for second part of issue #1352 where if you submit a reply from the + on a profile, it uses the hex nostr url rather than the bech32 version. When typing the @ manually it uses the bech32 so updated to mirror this. --- damus/Views/PostView.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/damus/Views/PostView.swift b/damus/Views/PostView.swift index e1cdf9d13..2b5cd067a 100644 --- a/damus/Views/PostView.swift +++ b/damus/Views/PostView.swift @@ -195,7 +195,8 @@ struct PostView: View { } let profile = damus_state.profiles.lookup(id: pubkey) - return user_tag_attr_string(profile: profile, pubkey: pubkey) + let bech32_pubkey = bech32_pubkey(pubkey) ?? "" + return user_tag_attr_string(profile: profile, pubkey: bech32_pubkey) } func clear_draft() {