diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/room/RoomSyncHandler.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/room/RoomSyncHandler.kt index 7d34d41e52..e488516928 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/room/RoomSyncHandler.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/room/RoomSyncHandler.kt @@ -514,6 +514,9 @@ internal class RoomSyncHandler @Inject constructor(private val readReceiptHandle * we clear all SENT events, and we are sure that we will receive it from /sync or pagination */ private fun fixStuckLocalEcho(rooms: List) { + // when there are not room events, there is no need to delete SENT messages + // this might be useful for events like typing etc + if(rooms.isNullOrEmpty()) return rooms.forEach { roomEntity -> roomEntity.sendingTimelineEvents.filter { timelineEvent -> timelineEvent.root?.sendState == SendState.SENT