Set current ts for local events age

This commit is contained in:
Florian Renaud 2022-07-01 09:57:45 +02:00
parent 7415623c2f
commit 0dad4cb02a
1 changed files with 2 additions and 1 deletions

View File

@ -156,7 +156,8 @@ internal class DefaultCreateLocalRoomTask @Inject constructor(
continue continue
} }
val eventEntity = event.toEntity(roomId, SendState.SYNCED, null).copyToRealmOrIgnore(realm, EventInsertType.INCREMENTAL_SYNC) val now = clock.epochMillis()
val eventEntity = event.toEntity(roomId, SendState.SYNCED, now).copyToRealmOrIgnore(realm, EventInsertType.INCREMENTAL_SYNC)
if (event.stateKey != null) { if (event.stateKey != null) {
CurrentStateEventEntity.getOrCreate(realm, roomId, event.stateKey, event.type).apply { CurrentStateEventEntity.getOrCreate(realm, roomId, event.stateKey, event.type).apply {
eventId = event.eventId eventId = event.eventId