chatmail / chatmail/core

problems with "chat noticed" synchronization

Open
#7,965 12 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
929
Forks
143
Avg merge
1d 20h
Merged PRs (30d)
53

Description

the current approach to chat read status synchronization has several flaws:

- when user opens a chat in device A, the chat loses the badge counter, but on device B only the messages that got seen in device A get deducted from the counter, here there is already a split in chat status synchronization
- when user enters a chat and read only the messages shown in the screen, then go out, then the chat counter is lost and user end at the end of the chat without possibility to continue reading where they left

the solution:

I already talked a bit about this with @link2xt, a simple solution is:

When receiving a "message was marked as read" event, instead of just removing that message from the badge counter, consider "noticed" ALL previous messages ABOVE that message id

when opening a chat, don't mark it as notice, this API could probably just be deleted, then the "current chat position" marker will always be at the last seen/read message and user can re-enter the chat and continue

when the user uses the "go to bottom" button, then the latest messages in the chat are marked as seen then in the other devices the badge counter will disappear even if there were unread messages that were skipped by jumping to bottom, solving the current problem of unwanted "random skipped messages" still counting in the badge counter and having badge counter in one device while not in another

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.