diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/verification/VerificationTransport.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/verification/VerificationTransport.kt index cedcf2865d..081e1f9ec5 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/verification/VerificationTransport.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/verification/VerificationTransport.kt @@ -34,6 +34,9 @@ internal interface VerificationTransport { onErrorReason: CancelCode, onDone: (() -> Unit)?) + /** + * @param callback will be called with eventId and ValidVerificationInfoRequest in case of success + */ fun sendVerificationRequest(supportedMethods: List, localId: String, otherUserId: String, diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/verification/VerificationTransportRoomMessage.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/verification/VerificationTransportRoomMessage.kt index 75f5ecb034..c0fbe2e41f 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/verification/VerificationTransportRoomMessage.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/verification/VerificationTransportRoomMessage.kt @@ -198,10 +198,13 @@ internal class VerificationTransportRoomMessage( ?.let { wInfo -> if (SendVerificationMessageWorker.hasFailed(wInfo.outputData)) { callback(null, null) - } else if (wInfo.outputData.getString(localId) != null) { - callback(wInfo.outputData.getString(localId), validInfo) } else { - callback(null, null) + val eventId = wInfo.outputData.getString(localId) + if (eventId != null) { + callback(eventId, validInfo) + } else { + callback(null, null) + } } workLiveData.removeObserver(this) }