kopia lustrzana https://github.com/ryukoposting/Signal-Android
Filter badly-formatted numbers from one-off CDS requests.
rodzic
db16155b0d
commit
aab8bd1261
|
@ -65,7 +65,7 @@ object ContactDiscoveryRefreshV2 {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun refresh(context: Context, inputRecipients: List<Recipient>, useCompat: Boolean, ignoreResults: Boolean): ContactDiscovery.RefreshResult {
|
fun refresh(context: Context, inputRecipients: List<Recipient>, useCompat: Boolean, ignoreResults: Boolean): ContactDiscovery.RefreshResult {
|
||||||
val recipients: List<Recipient> = inputRecipients.map { it.resolve() }
|
val recipients: List<Recipient> = inputRecipients.map { it.resolve() }
|
||||||
val inputE164s: Set<String> = recipients.mapNotNull { it.e164.orElse(null) }.toSet()
|
val inputE164s: Set<String> = recipients.mapNotNull { it.e164.orElse(null) }.toSet().sanitize()
|
||||||
|
|
||||||
return if (inputE164s.size > MAXIMUM_ONE_OFF_REQUEST_SIZE) {
|
return if (inputE164s.size > MAXIMUM_ONE_OFF_REQUEST_SIZE) {
|
||||||
Log.i(TAG, "List of specific recipients to refresh is too large! (Size: ${recipients.size}). Doing a full refresh instead.")
|
Log.i(TAG, "List of specific recipients to refresh is too large! (Size: ${recipients.size}). Doing a full refresh instead.")
|
||||||
|
|
|
@ -104,7 +104,7 @@ public final class FeatureFlags {
|
||||||
private static final String RECIPIENT_MERGE_V2 = "android.recipientMergeV2";
|
private static final String RECIPIENT_MERGE_V2 = "android.recipientMergeV2";
|
||||||
private static final String CDS_V2_LOAD_TEST = "android.cdsV2LoadTest";
|
private static final String CDS_V2_LOAD_TEST = "android.cdsV2LoadTest";
|
||||||
private static final String SMS_EXPORTER = "android.sms.exporter";
|
private static final String SMS_EXPORTER = "android.sms.exporter";
|
||||||
private static final String CDS_V2_COMPAT = "android.cdsV2Compat.2";
|
private static final String CDS_V2_COMPAT = "android.cdsV2Compat.3";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We will only store remote values for flags in this set. If you want a flag to be controllable
|
* We will only store remote values for flags in this set. If you want a flag to be controllable
|
||||||
|
|
Ładowanie…
Reference in New Issue