-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Persistently store failed to send messages #3152
Comments
Thanks for opening an issue. Do we want it to be restored while the app has been running, or even after the app has been restarted? (Hint: the former is rather easy, the latter is more involved.) |
I think at least while the app has been running is sufficient for now, maybe we can explore the latter in the future. The important thing for now is to allow users to not lose them while navigating rooms in the same app run. |
Owait, you mean messages that haven't been sent, i.e. that are only in the text editor? If so, the Rust SDK doesn't manage this data, so it can't really memorize it, until it does manage it, and that really sounds like a UI-related responsibility to me? (Otherwise we'd end up with another API to let the SDK know that a message has been erased too) |
Unsent messages as messages that have been queued and sent, have failed to be received by the server for some network error (like bad connection) and only exist as a local message that need to be either resent or cancelled. |
Here's some information that might help when implementing this: matrix_sdk_ui::timeline::Timeline::send creates local echo and then tries to send event
Questions:
|
We have a room cache in the
As said in #3152 (comment), saving in memory would probably be sufficient to start with, but that doesn't fundamentally change the requirements here (still necessary to clean up after sending succeeded). I suppose if we really want to save them in a database, we'd need to think which is appropriate: definitely not the crypto store, and the state store or the event cache store would be ok if they lived in the UI crate (otherwise, we'd be putting UI-specific functionality in the main crate, which is bad tightly coupling between the two components). |
I do want to chime in here and give a user perspective. |
Replaced by #3361, which is about implementing the in-memory store and on-disk storage 🥳 |
In Element X unsent messages stay in the timeline as long as the room is in the SS window, as soon as the room is unsubscribed from it, and the timeline is reloaded through the next sync loop, the unsent messages are completely gone, not offering the user a second chance to resend them if they are having connection issues.
As of right now they are just cached in the timeline, but not stored persistently. The idea is that they should be stored persistently, and always displayed at the bottom of the timeline, when its reloaded (even if it has been updated).
The text was updated successfully, but these errors were encountered: