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

fix: Let calling message update the event timestamp when before a deleted message #14838

Merged
merged 1 commit into from
Mar 16, 2023

Conversation

atomrc
Copy link
Contributor

@atomrc atomrc commented Mar 16, 2023

STR:

  • start a call in a group (pick up or not, is doesn't affect the result)
  • send a text message
  • delete that text message
  • send another text message
    -> the last text message doesn't show up

The problem

The problem is that the conversation timestamp gets updated backward when deleting the last event of the conversation.
But because call events are not supposed to affect the timestamp, in this case we try to update the timestamp to the timestamp of a message that is not supposed to update it.

That means that the conversation last event timestamp will be in the future compared to the last loaded event (which typically means that the conversation is scrolled up and we are not looking at the last message of the conversation).
In this case the webapp doesn't append new messages at the end of the message list.

Notes for the future

This timestamp computation is pretty messy and would need a clean rethink at some point

@atomrc atomrc merged commit 93b1ff9 into dev Mar 16, 2023
@atomrc atomrc deleted the fix/lost-msg branch March 16, 2023 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants