From 490780b90675bdeece883b74ff621db12b0136e9 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 5 Mar 2021 09:39:47 +0100 Subject: [PATCH] Fix classical init sync (not used anymore, except in debug mode) case. --- .../matrix/android/sdk/internal/session/sync/RoomSyncHandler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/RoomSyncHandler.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/RoomSyncHandler.kt index 0415754645..b2db6320f1 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/RoomSyncHandler.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/RoomSyncHandler.kt @@ -195,7 +195,7 @@ internal class RoomSyncHandler @Inject constructor(private val readReceiptHandle if (handleEphemeralEvents) { ephemeralResult = roomSync.ephemeral?.roomSyncEphemeral?.events ?.takeIf { it.isNotEmpty() } - ?.let { handleEphemeral(realm, roomId, it, false) } + ?.let { handleEphemeral(realm, roomId, it, insertType == EventInsertType.INITIAL_SYNC) } } if (roomSync.accountData?.events?.isNotEmpty() == true) {