You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could not find a solution in the existing issues, docs, nor discussions
Describe your problem
In the loadArchiveWithTimeline method _archivedRooms.clear() is called in the beginning of the function. This may lead to unwanted side effects. For example, when the client is online and loads its state correctly including archived rooms. Then, we will go offline with our client and call loadArchiveWithTimeline() again. This will clear all the archived rooms, and will try to do a sync, but the sync will fail because it can't establish a connection to the homeserver. Now, I have lost the archived rooms until I get online again.
Preflight Checklist
Describe your problem
In the
loadArchiveWithTimeline
method_archivedRooms.clear()
is called in the beginning of the function. This may lead to unwanted side effects. For example, when the client is online and loads its state correctly including archived rooms. Then, we will go offline with our client and callloadArchiveWithTimeline()
again. This will clear all the archived rooms, and will try to do a sync, but the sync will fail because it can't establish a connection to the homeserver. Now, I have lost the archived rooms until I get online again.See:
matrix-dart-sdk/lib/src/client.dart
Line 1154 in 24a0cfb
Describe your ideal solution
I would suggest to put the
_archivedRooms.clear()
call after the sync, so that we will delete the old state only if the sync was successful.Version
0.37
Security requirements
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: