mirror of
https://github.com/chatmail/core.git
synced 2026-09-22 13:01:21 +03:00
mark incoming call as noticed on the second device when accepted
This commit is contained in:
@@ -437,6 +437,10 @@ impl Context {
|
|||||||
call.mark_as_accepted(self).await?;
|
call.mark_as_accepted(self).await?;
|
||||||
self.emit_msgs_changed(call.msg.chat_id, call_id);
|
self.emit_msgs_changed(call.msg.chat_id, call_id);
|
||||||
if call.is_incoming() {
|
if call.is_incoming() {
|
||||||
|
call_id
|
||||||
|
.mark_as_noticed(self)
|
||||||
|
.await
|
||||||
|
.context("Failed to mark incoming call as noticed")?;
|
||||||
self.emit_event(EventType::IncomingCallAccepted {
|
self.emit_event(EventType::IncomingCallAccepted {
|
||||||
msg_id: call.msg.id,
|
msg_id: call.msg.id,
|
||||||
chat_id: call.msg.chat_id,
|
chat_id: call.msg.chat_id,
|
||||||
|
|||||||
@@ -169,6 +169,10 @@ async fn accept_call() -> Result<CallSetup> {
|
|||||||
.expect("bob2_call should be a call message");
|
.expect("bob2_call should be a call message");
|
||||||
assert!(info.is_accepted());
|
assert!(info.is_accepted());
|
||||||
assert_eq!(call_state(&bob2, bob2_call.id).await?, CallState::Active);
|
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 receives the acceptance message
|
||||||
alice.recv_msg_trash(&sent2).await;
|
alice.recv_msg_trash(&sent2).await;
|
||||||
|
|||||||
Reference in New Issue
Block a user