File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ impl Context {
111
111
match mime_message. is_system_message {
112
112
SystemMessage :: IncomingCall => {
113
113
let call = self . load_call_by_root_id ( call_or_child_id) . await ?;
114
+ self . emit_msgs_changed ( call. msg . chat_id , call_or_child_id) ;
114
115
if call. incoming {
115
116
self . emit_event ( EventType :: IncomingCall {
116
117
msg_id : call. msg . id ,
@@ -119,6 +120,7 @@ impl Context {
119
120
}
120
121
SystemMessage :: CallAccepted => {
121
122
let call = self . load_call_by_child_id ( call_or_child_id) . await ?;
123
+ self . emit_msgs_changed ( call. msg . chat_id , call_or_child_id) ;
122
124
if call. incoming {
123
125
self . emit_event ( EventType :: IncomingCallAccepted {
124
126
msg_id : call. msg . id ,
@@ -131,6 +133,7 @@ impl Context {
131
133
}
132
134
SystemMessage :: CallEnded => {
133
135
let call = self . load_call_by_child_id ( call_or_child_id) . await ?;
136
+ self . emit_msgs_changed ( call. msg . chat_id , call_or_child_id) ;
134
137
self . emit_event ( EventType :: CallEnded {
135
138
msg_id : call. msg . id ,
136
139
} ) ;
Original file line number Diff line number Diff line change @@ -622,7 +622,12 @@ pub(crate) async fn receive_imf_inner(
622
622
}
623
623
}
624
624
625
- if received_msg. hidden {
625
+ if mime_parser. is_system_message == SystemMessage :: IncomingCall
626
+ || mime_parser. is_system_message == SystemMessage :: CallAccepted
627
+ || mime_parser. is_system_message == SystemMessage :: CallEnded
628
+ {
629
+ context. handle_call_msg ( & mime_parser, insert_msg_id) . await ?;
630
+ } else if received_msg. hidden {
626
631
// No need to emit an event about the changed message
627
632
} else if let Some ( replace_chat_id) = replace_chat_id {
628
633
context. emit_msgs_changed_without_msg_id ( replace_chat_id) ;
@@ -634,13 +639,6 @@ pub(crate) async fn receive_imf_inner(
634
639
}
635
640
context. new_msgs_notify . notify_one ( ) ;
636
641
637
- if mime_parser. is_system_message == SystemMessage :: IncomingCall
638
- || mime_parser. is_system_message == SystemMessage :: CallAccepted
639
- || mime_parser. is_system_message == SystemMessage :: CallEnded
640
- {
641
- context. handle_call_msg ( & mime_parser, insert_msg_id) . await ?;
642
- }
643
-
644
642
mime_parser
645
643
. handle_reports ( context, from_id, & mime_parser. parts )
646
644
. await ;
You can’t perform that action at this time.
0 commit comments