diff --git a/src/calls.rs b/src/calls.rs index 7f76428af..064c1038c 100644 --- a/src/calls.rs +++ b/src/calls.rs @@ -437,6 +437,10 @@ impl Context { call.mark_as_accepted(self).await?; self.emit_msgs_changed(call.msg.chat_id, call_id); if call.is_incoming() { + call_id + .mark_as_noticed(self) + .await + .context("Failed to mark incoming call as noticed")?; self.emit_event(EventType::IncomingCallAccepted { msg_id: call.msg.id, chat_id: call.msg.chat_id, diff --git a/src/calls/calls_tests.rs b/src/calls/calls_tests.rs index 2bcc56ab9..04e9de4a3 100644 --- a/src/calls/calls_tests.rs +++ b/src/calls/calls_tests.rs @@ -169,6 +169,10 @@ async fn accept_call() -> Result { .expect("bob2_call should be a call message"); assert!(info.is_accepted()); assert_eq!(call_state(&bob2, bob2_call.id).await?, CallState::Active); + assert_eq!( + bob2_call.id.get_state(&bob2).await?, + MessageState::InNoticed + ); // Alice receives the acceptance message alice.recv_msg_trash(&sent2).await;