mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Bump to libsignal v0.71.0.
This commit is contained in:
committed by
Michelle Tang
parent
a2a3dd28ee
commit
9b9888565b
@@ -4,6 +4,7 @@ import org.signal.libsignal.protocol.IdentityKey
|
||||
import org.signal.libsignal.protocol.IdentityKeyPair
|
||||
import org.signal.libsignal.protocol.SignalProtocolAddress
|
||||
import org.signal.libsignal.protocol.state.IdentityKeyStore
|
||||
import org.signal.libsignal.protocol.state.IdentityKeyStore.IdentityChange
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase
|
||||
import org.whispersystems.signalservice.api.SignalServiceAccountDataStore
|
||||
import org.whispersystems.signalservice.api.push.ServiceId
|
||||
@@ -30,16 +31,16 @@ class BufferedIdentityKeyStore(
|
||||
return selfRegistrationId
|
||||
}
|
||||
|
||||
override fun saveIdentity(address: SignalProtocolAddress, identityKey: IdentityKey): Boolean {
|
||||
override fun saveIdentity(address: SignalProtocolAddress, identityKey: IdentityKey): IdentityChange {
|
||||
val existing: IdentityKey? = getIdentity(address)
|
||||
|
||||
store[address] = identityKey
|
||||
|
||||
return if (identityKey != existing) {
|
||||
updatedKeys[address] = identityKey
|
||||
true
|
||||
IdentityChange.REPLACED_EXISTING
|
||||
} else {
|
||||
false
|
||||
IdentityChange.NEW_OR_UNCHANGED
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.signal.libsignal.protocol.IdentityKeyPair
|
||||
import org.signal.libsignal.protocol.SignalProtocolAddress
|
||||
import org.signal.libsignal.protocol.groups.state.SenderKeyRecord
|
||||
import org.signal.libsignal.protocol.state.IdentityKeyStore
|
||||
import org.signal.libsignal.protocol.state.IdentityKeyStore.IdentityChange
|
||||
import org.signal.libsignal.protocol.state.KyberPreKeyRecord
|
||||
import org.signal.libsignal.protocol.state.PreKeyRecord
|
||||
import org.signal.libsignal.protocol.state.SessionRecord
|
||||
@@ -41,7 +42,7 @@ class BufferedSignalServiceAccountDataStore(selfServiceId: ServiceId) : SignalSe
|
||||
return identityStore.localRegistrationId
|
||||
}
|
||||
|
||||
override fun saveIdentity(address: SignalProtocolAddress, identityKey: IdentityKey): Boolean {
|
||||
override fun saveIdentity(address: SignalProtocolAddress, identityKey: IdentityKey): IdentityChange {
|
||||
return identityStore.saveIdentity(address, identityKey)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user