mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-23 11:15:44 +00:00
Bump to libsignal v0.71.0.
This commit is contained in:
committed by
Michelle Tang
parent
a2a3dd28ee
commit
9b9888565b
@@ -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
|
||||
@@ -34,10 +35,13 @@ class InMemorySignalServiceAccountDataStore : SignalServiceAccountDataStore {
|
||||
return 1
|
||||
}
|
||||
|
||||
override fun saveIdentity(address: SignalProtocolAddress, identityKey: IdentityKey): Boolean {
|
||||
val hadPrevious = identities.containsKey(address)
|
||||
identities[address] = identityKey
|
||||
return hadPrevious
|
||||
override fun saveIdentity(address: SignalProtocolAddress, identityKey: IdentityKey): IdentityChange {
|
||||
val previous = identities.put(address, identityKey)
|
||||
return if (previous == null || previous == identityKey) {
|
||||
IdentityChange.NEW_OR_UNCHANGED
|
||||
} else {
|
||||
IdentityChange.REPLACED_EXISTING
|
||||
}
|
||||
}
|
||||
|
||||
override fun isTrustedIdentity(address: SignalProtocolAddress?, identityKey: IdentityKey?, direction: IdentityKeyStore.Direction?): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user