Skip to content

Commit

Permalink
Merge pull request #218 from ouchadam/bug/dendrite-infinite-login
Browse files Browse the repository at this point in the history
Fix dendrite failing to fully login
  • Loading branch information
ouchadam authored Oct 22, 2022
2 parents 82f2eea + 4bd75f1 commit f7f4c89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal data class ApiSyncResponse(
@SerialName("account_data") val accountData: ApiAccountData? = null,
@SerialName("rooms") val rooms: ApiSyncRooms? = null,
@SerialName("to_device") val toDevice: ToDevice? = null,
@SerialName("device_one_time_keys_count") val oneTimeKeysCount: Map<String, ServerKeyCount>,
@SerialName("device_one_time_keys_count") val oneTimeKeysCount: Map<String, ServerKeyCount>? = null,
@SerialName("next_batch") val nextBatch: SyncToken,
@SerialName("prev_batch") val prevBatch: SyncToken? = null,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ internal class SyncSideEffects(
notifyDevicesUpdated.notifyChanges(it, requestToken)
}

oneTimeKeyProducer.onServerKeyCount(response.oneTimeKeysCount["signed_curve25519"] ?: ServerKeyCount(0))
oneTimeKeyProducer.onServerKeyCount(response.oneTimeKeysCount?.get("signed_curve25519") ?: ServerKeyCount(0))

val decryptedToDeviceEvents = decryptedToDeviceEvents(response)
val roomKeys = handleRoomKeyShares(decryptedToDeviceEvents)
Expand Down

0 comments on commit f7f4c89

Please sign in to comment.