Skip to content

fix: do not mark call message as seen when declining a call - #8633

Open
link2xt wants to merge 1 commit into
mainfrom
link2xt/decline-call-not-mark-messages-as-noticed
Open

fix: do not mark call message as seen when declining a call#8633
link2xt wants to merge 1 commit into
mainfrom
link2xt/decline-call-not-mark-messages-as-noticed

Conversation

@link2xt

@link2xtlink2xt commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

When the message is marked as seen, an MDN (read receipt) is sent to self
and receiving such MDN marks all messages in the chat above the call message as noticed.
Calls may be declined from the notification, so user may decline a call
without ever seeing a call message in the chat.

Closes#8631

When the message is marked as seen, an MDN (read receipt) is sent to self
and receiving such MDN marks all messages in the chat above the call message as noticed.
Calls may be declined from the notification, so user may decline a call
without ever seeing a call message in the chat.
@link2xt
link2xtforce-pushed the link2xt/decline-call-not-mark-messages-as-noticed branch from 49467e9 to 3784b3eCompareAugust 27, 2026 16:37
@link2xtlink2xt changed the title test: test that declining a call does not mark the messages as noticedfix: do not mark call message as seen when declining a callAug 27, 2026
@link2xt
link2xt marked this pull request as ready for review August 27, 2026 16:38

@hpk42hpk42 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am afraid I don't quite get the overall scheme of how caller/callee and their multi-device setups are meant to land in consistent states including UI notifications/interactions. I filed an issue #8635 and is it not strictly related to this particular PR.

For this PR my main concern is that the second device of the Callee might be left with a "Missed call" notifcation if there is no self-MDN anymore. As far as i see, at receiving time, a stale-on-arrival call notifies via

core/src/calls.rs

Lines 368 to 372 in 3784b3e

if call.is_incoming(){
if call.is_stale(){
let missed_call_str = stock_str::missed_call(self);
call.update_text(self,&missed_call_str).await?;
self.emit_incoming_msg(call.msg.chat_id, call_id);// notify missed call
and i don't see what removes that notification afterwards.

The accepted-call path should probably be handled before #8631 can be closed but it doesn't necessarily block this PR i guess.

Comment threadsrc/calls.rs
if chat.is_contact_request() {
chat.id.accept(self).await?;
}
markseen_msgs(self, vec![call_id]).await?;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this the same problem?

i guess there should be a helper that both declining and accept call use.

Comment threadsrc/calls.rs
(MessageState::InNoticed, call_id, MessageState::InFresh),
)
.await
.context("Failed to mark incoming call as noticed")?;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This by itself does not send out anything, right?

Sign up for freeto 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.

Declining a call desyncs read states between devices

2 participants

@link2xt@hpk42