@@ -125,6 +125,7 @@ impl Context {
125125 ..Default :: default ( )
126126 } ;
127127 msg. param . set_cmd ( SystemMessage :: CallAccepted ) ;
128+ msg. hidden = true ;
128129 msg. param
129130 . set ( Param :: WebrtcAccepted , accept_call_info. to_string ( ) ) ;
130131 msg. set_quote ( self , Some ( & call. msg ) ) . await ?;
@@ -147,6 +148,7 @@ impl Context {
147148 ..Default :: default ( )
148149 } ;
149150 msg. param . set_cmd ( SystemMessage :: CallEnded ) ;
151+ msg. hidden = true ;
150152 msg. set_quote ( self , Some ( & call. msg ) ) . await ?;
151153 msg. id = send_msg ( self , call. msg . chat_id , & mut msg) . await ?;
152154 } else if call. is_incoming {
@@ -189,9 +191,9 @@ impl Context {
189191 if call. is_incoming {
190192 if call. is_stale_call ( ) {
191193 call. update_text ( self , "Missed call" ) . await ?;
192- self . emit_incoming_msg ( call. msg . chat_id , call_id) ;
194+ self . emit_incoming_msg ( call. msg . chat_id , call_id) ; // notify missed call
193195 } else {
194- self . emit_msgs_changed ( call. msg . chat_id , call_id) ;
196+ self . emit_msgs_changed ( call. msg . chat_id , call_id) ; // ringing calls are not additionally notified
195197 self . emit_event ( EventType :: IncomingCall {
196198 msg_id : call. msg . id ,
197199 place_call_info : call. place_call_info . to_string ( ) ,
@@ -210,6 +212,7 @@ impl Context {
210212 match mime_message. is_system_message {
211213 SystemMessage :: CallAccepted => {
212214 let call = self . load_call_by_id ( call_id) . await ?;
215+ call. update_text ( self , "Call accepted" ) . await ?;
213216 self . emit_msgs_changed ( call. msg . chat_id , call_id) ;
214217 if call. is_incoming {
215218 self . emit_event ( EventType :: IncomingCallAccepted {
@@ -232,6 +235,7 @@ impl Context {
232235 }
233236 SystemMessage :: CallEnded => {
234237 let call = self . load_call_by_id ( call_id) . await ?;
238+ call. update_text ( self , "Call ended" ) . await ?;
235239 self . emit_msgs_changed ( call. msg . chat_id , call_id) ;
236240 self . emit_event ( EventType :: CallEnded {
237241 msg_id : call. msg . id ,
0 commit comments