Skip to content
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

Message edits lost after restarts #713

Open
TobiasFella opened this issue Nov 4, 2023 · 1 comment · May be fixed by #714
Open

Message edits lost after restarts #713

TobiasFella opened this issue Nov 4, 2023 · 1 comment · May be fixed by #714
Assignees
Labels
enhancement A feature or change request for the library

Comments

@TobiasFella
Copy link
Member

Happens both in NeoChat and Quaternion.

When a message is edited (no matter by whom and in which client), the edit shows up fine in libQuotient based clients if it comes in live (as new messages, not historical messages). after restarting the client, the message shows up in the unedited form.

AFAICT the replacement is only processed in Room::Private::addNewMessageEvents but not in Room::Private::addHistoricalMessageEvents, which would explain this.

@TobiasFella TobiasFella added the bug/fix The library doesn't work as expected label Nov 4, 2023
@TobiasFella TobiasFella self-assigned this Nov 4, 2023
@KitsuneRal
Copy link
Member

The assumption has always been that once the message is edited, it is the homeserver's job to serve the already edited message instead of clients having to re-aggregate all contributing events: https://spec.matrix.org/latest/client-server-api/#aggregations-of-child-events (note the presence of /messages in the list of endpoints where the server should aggregate things).

That being said, should is not must, and adding invocation of processReplacement() to addHistoricalMessageEvents() (or rather, the common code called from both addNew* and addHistorical*) would make sense to account for homeserver implementations with less comprehensive aggregation logic.

@KitsuneRal KitsuneRal added enhancement A feature or change request for the library and removed bug/fix The library doesn't work as expected labels Nov 4, 2023
@TobiasFella TobiasFella linked a pull request Nov 4, 2023 that will close this issue
@KitsuneRal KitsuneRal moved this to 0.9 - To Do in libQuotient 1 May 17, 2024
@KitsuneRal KitsuneRal moved this from 0.9 - To Do to In work in libQuotient 1 Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature or change request for the library
Projects
Status: 0.9 - To Do
Development

Successfully merging a pull request may close this issue.

2 participants