Merge pull request #5318 from vector-im/erikj/log_since_token

Also record `next_batch` on `/sync` response
This commit is contained in:
Benoit Marty 2022-02-23 13:47:48 +01:00 committed by GitHub
commit 9e9dc1defd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -1 +1 @@
Log the `since` token used when doing an incremental sync.
Log the `since` token used and `next_batch` token returned when doing an incremental sync.

1
changelog.d/5318.misc Normal file
View File

@ -0,0 +1 @@
Log the `since` token used and `next_batch` token returned when doing an incremental sync.

View File

@ -163,7 +163,10 @@ internal class DefaultSyncTask @Inject constructor(
}
val nbRooms = syncResponse.rooms?.invite.orEmpty().size + syncResponse.rooms?.join.orEmpty().size + syncResponse.rooms?.leave.orEmpty().size
val nbToDevice = syncResponse.toDevice?.events.orEmpty().size
Timber.tag(loggerTag.value).d("Incremental sync request parsing, $nbRooms room(s) $nbToDevice toDevice(s)")
val nextBatch = syncResponse.nextBatch
Timber.tag(loggerTag.value).d(
"Incremental sync request parsing, $nbRooms room(s) $nbToDevice toDevice(s). Got nextBatch: $nextBatch"
)
defaultSyncStatusService.setStatus(SyncStatusService.Status.IncrementalSyncParsing(
rooms = nbRooms,
toDevice = nbToDevice