Fix some crypto realm issues
This commit is contained in:
parent
aa9d66b991
commit
eb9775e307
@ -643,9 +643,10 @@ internal class RealmCryptoStore(private val realmConfiguration: RealmConfigurati
|
||||
}
|
||||
|
||||
override fun getOutgoingRoomKeyRequestByState(states: Set<OutgoingRoomKeyRequest.RequestState>): OutgoingRoomKeyRequest? {
|
||||
val statesIndex = states.map { it.ordinal }.toTypedArray()
|
||||
return doRealmQueryAndCopy(realmConfiguration) {
|
||||
it.where<OutgoingRoomKeyRequestEntity>()
|
||||
.`in`(OutgoingRoomKeyRequestEntityFields.STATE, states.map { it.ordinal }.toTypedArray())
|
||||
.`in`(OutgoingRoomKeyRequestEntityFields.STATE, statesIndex)
|
||||
.findFirst()
|
||||
}
|
||||
?.toOutgoingRoomKeyRequest()
|
||||
|
@ -41,6 +41,7 @@ internal open class OutgoingRoomKeyRequestEntity(
|
||||
* Convert to OutgoingRoomKeyRequest
|
||||
*/
|
||||
fun toOutgoingRoomKeyRequest(): OutgoingRoomKeyRequest {
|
||||
val cancellationTxnId = this.cancellationTxnId
|
||||
return OutgoingRoomKeyRequest(
|
||||
RoomKeyRequestBody().apply {
|
||||
algorithm = requestBodyAlgorithm
|
||||
|
Loading…
x
Reference in New Issue
Block a user