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: Emit MsgsNoticed on receipt of an IMAP-seen message #6415

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

iequidoo
Copy link
Collaborator

@iequidoo iequidoo commented Jan 8, 2025

See commit messages.

Let's continue the discussion here, this is a reply to #6351 (comment).

FTR, if we have an actual user value for emitting MsgsNoticed on receipt of an IMAP-seen message, and test that MsgsNoticed is not emitted for every reaction and mdn, then I'm not against it.

Removed emitting MsgsNoticed for the trash chat (added a check) and added such tests, though the test on receiving a seen reaction is apparently going to be broken by #6213 because reactions will be assigned to the actual chat, not to the trash. But i don't see a problem here, reactions just become hidden messages and if a reaction is seen, that's a result of an explicit user action and also means that the user has noticed notifications for earlier messages.

`imap::Session::sync_seen_flags()` emits `MsgsNoticed` for existing messages seen on other devices,
so `receive_imf` should do the same when it receives a seen message. Otherwise a multi-device user
may see a new message notification on device A, just swipe it, then see another new message
notification and mark it as read, and when their device B goes online, it will show a notification
for the first message, and it won't be removed because `MsgsNoticed` isn't emitted. I have checked
this with my DC Android and Desktop. With this fix the notification can be removed if UIs handle
`MsgsNoticed` accordingly, though currently i can't achieve this behaviour on Desktop. Anyway, the
fix unifies the `receive_imf` behaviour with `sync_seen_flags()`.
@iequidoo iequidoo marked this pull request as ready for review January 8, 2025 19:27
@iequidoo iequidoo requested a review from Hocuri January 8, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant