diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 968bd5cce..1a85fe035 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -75,6 +75,20 @@
android:scheme="https" />
+
+
+
+
+
+
+
+
+
@@ -95,6 +109,7 @@
+
{
+ val unknownProfileIdentifier = PRIMAL_PROFILE_REGEX.replace(this, "")
+ unknownProfileIdentifier.resolveProfileId()?.let { DeepLink.Profile(it) }
+ }
+
isNostrWalletConnectSchemaAndUrl() ->
runCatching {
DeepLink.NostrWalletConnect(nwc = this.parseNWCUrl())
@@ -35,6 +41,16 @@ fun String.parseDeepLinkOrNull(): DeepLink? =
else -> null
}
+private fun String.resolveProfileId(): String? =
+ when {
+ this.startsWith("npub") -> runCatching { bech32ToHexOrThrow() }.getOrNull()
+ this.startsWith("nprofile1") -> {
+ val pubkey = Nip19TLV.parseUriAsNprofileOrNull(this)?.pubkey
+ runCatching { pubkey?.bech32ToHexOrThrow() }.getOrNull()
+ }
+ else -> this
+ }
+
private fun String.resolveNoteId(): String? =
when {
this.startsWith("note1") -> runCatching { bech32ToHexOrThrow() }.getOrNull()