post merge fix

This commit is contained in:
Valere 2022-05-11 10:42:02 +02:00
parent 12ab4787f1
commit 546d6fe56d
2 changed files with 10 additions and 10 deletions

View File

@ -371,13 +371,13 @@ class CryptoTestHelper(private val testHelper: CommonTestHelper) {
val aliceVerificationService = alice.cryptoService().verificationService() val aliceVerificationService = alice.cryptoService().verificationService()
val bobVerificationService = bob.cryptoService().verificationService() val bobVerificationService = bob.cryptoService().verificationService()
aliceVerificationService.beginKeyVerificationInDMs( val localId = UUID.randomUUID().toString()
VerificationMethod.SAS, aliceVerificationService.requestKeyVerificationInDMs(
requestID, localId = localId,
roomId, methods = listOf(VerificationMethod.SAS, VerificationMethod.QR_CODE_SCAN, VerificationMethod.QR_CODE_SHOW),
bob.myUserId, otherUserId = bob.myUserId,
bob.sessionParams.credentials.deviceId!! roomId = roomId
) ).transactionId
testHelper.waitWithLatch { testHelper.waitWithLatch {
testHelper.retryPeriodicallyWithLatch(it) { testHelper.retryPeriodicallyWithLatch(it) {
@ -484,7 +484,7 @@ class CryptoTestHelper(private val testHelper: CommonTestHelper) {
sentEventIds.forEachIndexed { index, sentEventId -> sentEventIds.forEachIndexed { index, sentEventId ->
testHelper.waitWithLatch { latch -> testHelper.waitWithLatch { latch ->
testHelper.retryPeriodicallyWithLatch(latch) { testHelper.retryPeriodicallyWithLatch(latch) {
val event = session.getRoom(e2eRoomID)!!.getTimelineEvent(sentEventId)!!.root val event = session.getRoom(e2eRoomID)!!.timelineService().getTimelineEvent(sentEventId)!!.root
testHelper.runBlockingTest { testHelper.runBlockingTest {
try { try {
session.cryptoService().decryptEvent(event, "").let { result -> session.cryptoService().decryptEvent(event, "").let { result ->
@ -509,7 +509,7 @@ class CryptoTestHelper(private val testHelper: CommonTestHelper) {
fun ensureCannotDecrypt(sentEventIds: List<String>, session: Session, e2eRoomID: String, expectedError: MXCryptoError.ErrorType? = null) { fun ensureCannotDecrypt(sentEventIds: List<String>, session: Session, e2eRoomID: String, expectedError: MXCryptoError.ErrorType? = null) {
sentEventIds.forEach { sentEventId -> sentEventIds.forEach { sentEventId ->
val event = session.getRoom(e2eRoomID)!!.getTimelineEvent(sentEventId)!!.root val event = session.getRoom(e2eRoomID)!!.timelineService().getTimelineEvent(sentEventId)!!.root
testHelper.runBlockingTest { testHelper.runBlockingTest {
try { try {
session.cryptoService().decryptEvent(event, "") session.cryptoService().decryptEvent(event, "")

View File

@ -236,7 +236,7 @@ internal class MXMegolmDecryption(
} }
Timber.tag(loggerTag.value).i("onRoomKeyEvent addInboundGroupSession ${roomKeyContent.sessionId}") Timber.tag(loggerTag.value).i("onRoomKeyEvent addInboundGroupSession ${roomKeyContent.sessionId}")
val added = olmDevice.addInboundGroupSession( val addSessionResult = olmDevice.addInboundGroupSession(
roomKeyContent.sessionId, roomKeyContent.sessionId,
roomKeyContent.sessionKey, roomKeyContent.sessionKey,
roomKeyContent.roomId, roomKeyContent.roomId,