contacts: fix doubled plus in telegram chat links
- Commit
a39abec02116a6cda74f5f21883c4bad67cf5bf6- Author
- Vayun Mathur <[email protected]>
- When
- 2026-11-07 15:23 UTC (28 days ago)
- Parents
afac821
The Telegram branch kept an existing leading '+' from the number and then prepended another, producing https://t.me/++... links that Telegram cannot resolve. Filter to digits only before adding the single leading plus. Found by a second-pass coverage test of the comm launch paths. (cherry picked from commit 5582cb0b0c4078bb482d975fc7bf6235a91e8117)
Diff
contacts/src/main/java/com/vayunmathur/contacts/ui/ContactDetailsComms.kt
diff --git a/contacts/src/main/java/com/vayunmathur/contacts/ui/ContactDetailsComms.kt b/contacts/src/main/java/com/vayunmathur/contacts/ui/ContactDetailsComms.ktindex 0e20bb45cc..058151a0f4 100644--- a/contacts/src/main/java/com/vayunmathur/contacts/ui/ContactDetailsComms.kt+++ b/contacts/src/main/java/com/vayunmathur/contacts/ui/ContactDetailsComms.kt@@ -115,7 +115,7 @@ private fun smsIntentFor(number: String, packageName: String?): Intent = PackageUtils.TELEGRAM_PACKAGE -> Intent( Intent.ACTION_VIEW,- "https://t.me/+${number.filter { it.isDigit() || it == '+' }}".toUri()+ "https://t.me/+${number.filter { it.isDigit() }}".toUri() ) else -> Intent(Intent.ACTION_SENDTO, "sms:$number".toUri()) }