mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Ungate some PNP receive-side behavior.
This commit is contained in:
committed by
Alex Hart
parent
327cd93e3c
commit
ca3187d0b8
@@ -8,7 +8,6 @@ import org.signal.core.util.logging.Log
|
||||
import org.signal.core.util.update
|
||||
import org.signal.core.util.withinTransaction
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId
|
||||
import org.thoughtcrime.securesms.util.FeatureFlags
|
||||
import org.whispersystems.signalservice.api.messages.SendMessageResult
|
||||
|
||||
/**
|
||||
@@ -43,8 +42,6 @@ class PendingPniSignatureMessageTable(context: Context, databaseHelper: SignalDa
|
||||
}
|
||||
|
||||
fun insertIfNecessary(recipientId: RecipientId, sentTimestamp: Long, result: SendMessageResult) {
|
||||
if (!FeatureFlags.phoneNumberPrivacy()) return
|
||||
|
||||
if (!result.isSuccess) {
|
||||
return
|
||||
}
|
||||
@@ -63,8 +60,6 @@ class PendingPniSignatureMessageTable(context: Context, databaseHelper: SignalDa
|
||||
}
|
||||
|
||||
fun acknowledgeReceipts(recipientId: RecipientId, sentTimestamps: Collection<Long>, deviceId: Int) {
|
||||
if (!FeatureFlags.phoneNumberPrivacy()) return
|
||||
|
||||
writableDatabase.withinTransaction { db ->
|
||||
val count = db
|
||||
.delete(TABLE_NAME)
|
||||
@@ -93,7 +88,6 @@ class PendingPniSignatureMessageTable(context: Context, databaseHelper: SignalDa
|
||||
* Deletes all record of pending PNI verification messages. Should only be called after the user changes their number.
|
||||
*/
|
||||
fun deleteAll() {
|
||||
if (!FeatureFlags.phoneNumberPrivacy()) return
|
||||
writableDatabase.delete(TABLE_NAME).run()
|
||||
}
|
||||
|
||||
|
||||
@@ -440,10 +440,6 @@ open class RecipientTable(context: Context, databaseHelper: SignalDatabase) : Da
|
||||
* It is assumed that the tuple is verified. Do not give this method an untrusted association.
|
||||
*/
|
||||
fun getAndPossiblyMergePnpVerified(aci: ACI?, pni: PNI?, e164: String?): RecipientId {
|
||||
if (!FeatureFlags.phoneNumberPrivacy()) {
|
||||
throw AssertionError()
|
||||
}
|
||||
|
||||
return getAndPossiblyMerge(aci = aci, pni = pni, e164 = e164, pniVerified = true, changeSelf = false)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user