mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Remove system contact links from undiscoverable contacts.
This commit is contained in:
@@ -3124,11 +3124,12 @@ open class RecipientTable(context: Context, databaseHelper: SignalDatabase) : Da
|
||||
.readToSingleBoolean()
|
||||
}
|
||||
|
||||
fun getRegisteredE164s(): Set<String> {
|
||||
/** All e164's that are eligible for having a signal link added to their system contact entry. */
|
||||
fun getE164sForSystemContactLinks(): Set<String> {
|
||||
return readableDatabase
|
||||
.select(E164)
|
||||
.from(TABLE_NAME)
|
||||
.where("$REGISTERED = ? and $HIDDEN = ? AND $E164 NOT NULL", RegisteredState.REGISTERED.id, Recipient.HiddenState.NOT_HIDDEN.serialize())
|
||||
.where("$REGISTERED = ? and $HIDDEN = ? AND $E164 NOT NULL AND $PHONE_NUMBER_DISCOVERABLE != ?", RegisteredState.REGISTERED.id, Recipient.HiddenState.NOT_HIDDEN.serialize(), PhoneNumberDiscoverableState.NOT_DISCOVERABLE)
|
||||
.run()
|
||||
.readToSet { cursor ->
|
||||
cursor.requireNonNullString(E164)
|
||||
|
||||
Reference in New Issue
Block a user