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 70fcca0a92f..a0d1ebec4de 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 @@ -517,9 +517,9 @@ internal class RoomSyncHandler @Inject constructor(private val readReceiptHandle */ private fun deleteLocalEchosIfNeeded(insertType: EventInsertType, roomEntity: RoomEntity, eventList: List) { // Skip deletion if we are on initial sync - if(insertType == EventInsertType.INITIAL_SYNC) return + if (insertType == EventInsertType.INITIAL_SYNC) return // Skip deletion if there are no timeline events or there is no event received from the current user - if(eventList.firstOrNull { it.senderId == userId } == null) return + if (eventList.firstOrNull { it.senderId == userId } == null) return roomEntity.sendingTimelineEvents.filter { timelineEvent -> timelineEvent.root?.sendState == SendState.SENT }.forEach {