Fix / Syncs breaking on dendrite

This commit is contained in:
Valere 2021-01-12 15:37:48 +01:00
parent 7521a0d3ae
commit b7a89f4055
5 changed files with 5 additions and 5 deletions

View file

@ -456,7 +456,7 @@ internal class RoomSyncHandler @Inject constructor(private val readReceiptHandle
} }
private fun handleRoomAccountDataEvents(realm: Realm, roomId: String, accountData: RoomSyncAccountData) { private fun handleRoomAccountDataEvents(realm: Realm, roomId: String, accountData: RoomSyncAccountData) {
for (event in accountData.events) { accountData.events?.forEach { event ->
val eventType = event.getClearType() val eventType = event.getClearType()
if (eventType == EventType.TAG) { if (eventType == EventType.TAG) {
val content = event.getClearContent().toModel<RoomTagContent>() val content = event.getClearContent().toModel<RoomTagContent>()

View file

@ -25,5 +25,5 @@ internal data class RoomSyncAccountData(
/** /**
* List of account data events (array of Event). * List of account data events (array of Event).
*/ */
@Json(name = "events") val events: List<Event> = emptyList() @Json(name = "events") val events: List<Event>? = emptyList()
) )

View file

@ -26,5 +26,5 @@ internal data class RoomSyncEphemeral(
/** /**
* List of ephemeral events (array of Event). * List of ephemeral events (array of Event).
*/ */
@Json(name = "events") val events: List<Event> = emptyList() @Json(name = "events") val events: List<Event>? = emptyList()
) )

View file

@ -27,5 +27,5 @@ internal data class RoomSyncState(
/** /**
* List of state events (array of Event). The resulting state corresponds to the *start* of the timeline. * List of state events (array of Event). The resulting state corresponds to the *start* of the timeline.
*/ */
@Json(name = "events") val events: List<Event> = emptyList() @Json(name = "events") val events: List<Event>? = emptyList()
) )

View file

@ -27,7 +27,7 @@ internal data class RoomSyncTimeline(
/** /**
* List of events (array of Event). * List of events (array of Event).
*/ */
@Json(name = "events") val events: List<Event> = emptyList(), @Json(name = "events") val events: List<Event>? = emptyList(),
/** /**
* Boolean which tells whether there are more events on the server * Boolean which tells whether there are more events on the server