mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Filter out bad E164s from GV1 groups.
This commit is contained in:
committed by
Cody Henthorne
parent
e45eabc714
commit
a2a10fb0c1
@@ -53,6 +53,14 @@ object SignalE164Util {
|
||||
return getFormatter().formatAsE164(input)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the input string can be considered an E164. Specifically, it returns true if we could figure out how to format it as an E164.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun isPotentialE164(input: String): Boolean {
|
||||
return formatAsE164(input) != null
|
||||
}
|
||||
|
||||
private fun getFormatter(): E164Util.Formatter {
|
||||
val localNumber = SignalStore.account.e164 ?: return defaultFormatter
|
||||
val formatter = cachedFormatters[localNumber]
|
||||
|
||||
Reference in New Issue
Block a user