mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-21 17:05:39 +03:00
Fix assignment issue. sessionId
was used instead of roomId
.
This may fix issue of Event not decrypted if the key is coming late for the last Event displayed in the Room list.
This commit is contained in:
parent
e04bfe8981
commit
ec96f4e0ae
1 changed files with 5 additions and 5 deletions
|
@ -627,7 +627,7 @@ internal class RustCryptoService @Inject constructor(
|
|||
}
|
||||
|
||||
private fun notifyRoomKeyReceived(
|
||||
roomId: String,
|
||||
roomId: String?,
|
||||
sessionId: String,
|
||||
) {
|
||||
megolmSessionImportManager.dispatchNewSession(roomId, sessionId)
|
||||
|
@ -665,8 +665,8 @@ internal class RustCryptoService @Inject constructor(
|
|||
EventType.ROOM_KEY -> {
|
||||
val content = event.getClearContent().toModel<RoomKeyContent>() ?: return@forEach
|
||||
|
||||
val roomId = content.sessionId ?: return@forEach
|
||||
val sessionId = content.sessionId
|
||||
val roomId = content.roomId
|
||||
val sessionId = content.sessionId ?: return@forEach
|
||||
|
||||
notifyRoomKeyReceived(roomId, sessionId)
|
||||
matrixConfiguration.cryptoAnalyticsPlugin?.onRoomKeyImported(sessionId, EventType.ROOM_KEY)
|
||||
|
@ -674,8 +674,8 @@ internal class RustCryptoService @Inject constructor(
|
|||
EventType.FORWARDED_ROOM_KEY -> {
|
||||
val content = event.getClearContent().toModel<ForwardedRoomKeyContent>() ?: return@forEach
|
||||
|
||||
val roomId = content.sessionId ?: return@forEach
|
||||
val sessionId = content.sessionId
|
||||
val roomId = content.roomId
|
||||
val sessionId = content.sessionId ?: return@forEach
|
||||
|
||||
notifyRoomKeyReceived(roomId, sessionId)
|
||||
matrixConfiguration.cryptoAnalyticsPlugin?.onRoomKeyImported(sessionId, EventType.FORWARDED_ROOM_KEY)
|
||||
|
|
Loading…
Reference in a new issue