File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -87,10 +87,7 @@ impl Context {
87
87
chat. id . accept ( self ) . await ?;
88
88
}
89
89
90
- // mark call as "accepted" (this is just Param::Arg atm)
91
- let mut msg = call. msg . clone ( ) ;
92
- msg. param . set_int ( Param :: Arg , 1 ) ;
93
- msg. update_param ( self ) . await ?;
90
+ call. msg . clone ( ) . mark_call_as_accepted ( self ) . await ?;
94
91
95
92
// send an acceptance message around: to the caller as well as to the other devices of the callee
96
93
let mut msg = Message {
@@ -234,6 +231,14 @@ impl Context {
234
231
}
235
232
}
236
233
234
+ impl Message {
235
+ async fn mark_call_as_accepted ( & mut self , context : & Context ) -> Result < ( ) > {
236
+ self . param . set_int ( Param :: Arg , 1 ) ;
237
+ self . update_param ( context) . await ?;
238
+ Ok ( ( ) )
239
+ }
240
+ }
241
+
237
242
#[ cfg( test) ]
238
243
mod tests {
239
244
use super :: * ;
You can’t perform that action at this time.
0 commit comments