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

feat: Mark reactions as IMAP-seen in marknoticed_chat() (#6210) #6213

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

Conversation

iequidoo
Copy link
Collaborator

@iequidoo iequidoo commented Nov 15, 2024

See commit messages.
Close #6210

For DC_CHAT_ID_ARCHIVED_LINK this does nothing, marking all reactions as seen in the archive doesn't seem useful. mark_old_messages_as_noticed() only marks reactions as InNoticed, this function is called from imap when new messages arrive, so it is anyway called on all devices, no synchronisation is needed.

DONE:

  • Check that no unnecessary heavy columns are saved.

@iequidoo iequidoo marked this pull request as ready for review November 15, 2024 23:41
@iequidoo iequidoo requested review from r10s and Hocuri November 16, 2024 01:08
src/chat.rs Show resolved Hide resolved
@iequidoo iequidoo marked this pull request as draft November 16, 2024 17:09
@Hocuri
Copy link
Collaborator

Hocuri commented Nov 18, 2024

Since you marked it as a draft, I take it that it's not ready to be reviewed yet?

When a reaction notification is shown in the UIs, there's an option "Mark Read", but the UIs are
unaware of reactions message ids, moreover there are no `msgs` rows for reactions in the core, so
the UIs just call `marknoticed_chat()` in this case. We don't want to introduce reactions message
ids to the UIs (at least currently), but let's make received reactions usual messages, just hidden,
so that the existing `\Seen` flag synchronisation mechanism works for them, and mark all incoming
hidden messages in the chat as seen in `marknoticed_chat()`.

It's interesting that sent out reactions are already hidden messages, so this change mostly just
unifies things.
@iequidoo iequidoo marked this pull request as ready for review November 18, 2024 19:00
@iequidoo
Copy link
Collaborator Author

iequidoo commented Nov 18, 2024

Since you marked it as a draft, I take it that it's not ready to be reviewed yet?

Now it's ready and seems working, but probably needs more tests. Was a draft because i needed to optimise out saving unnecessary columns to db.

It's interesting that sent out reactions were already hidden messages, didn't know about that.

@Hocuri Hocuri requested a review from link2xt November 18, 2024 19:22
@Hocuri
Copy link
Collaborator

Hocuri commented Nov 19, 2024

Ideally there will be a test that marks a reaction as seen on one device and checks that a MsgsNoticed event is emitted on another device (and check that the test fails without this PR here), in addition to the unit tests. If this is not feasible, would be good to manually test that this event is sent.

Edit: If, during testing, it turns out that it's harder to do than expected, it would be fine to just ignore the issue, see deltachat/deltachat-android#3377 (comment)

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.

Make it possible to mark reactions as "seen"
2 participants