@@ -69,22 +69,13 @@ pub(super) async fn start_protocol(context: &Context, invite: QrInvite) -> Resul
69
69
}
70
70
info ! ( context, "Using fast securejoin with symmetric encryption" ) ;
71
71
72
- let mut msg = Message {
73
- viewtype : Viewtype :: Text ,
74
- // TODO I may want to make this generic also for group/contacts
75
- text : "Secure-Join: vb-request-with-auth" . to_string ( ) ,
76
- hidden : true ,
77
- ..Default :: default ( )
78
- } ;
79
- msg. param . set_cmd ( SystemMessage :: SecurejoinMessage ) ;
80
-
81
- msg. param . set ( Param :: Arg , "vb-request-with-auth" ) ;
82
- msg. param . set ( Param :: Arg2 , invite. authcode ( ) ) ;
83
- msg. param . set_int ( Param :: GuaranteeE2ee , 1 ) ;
84
- let bob_fp = self_fingerprint ( context) . await ?;
85
- msg. param . set ( Param :: Arg3 , bob_fp) ;
86
-
87
- chat:: send_msg ( context, private_chat_id, & mut msg) . await ?;
72
+ send_handshake_message (
73
+ context,
74
+ & invite,
75
+ private_chat_id,
76
+ BobHandshakeMsg :: RequestWithAuth ,
77
+ )
78
+ . await ?;
88
79
89
80
context. emit_event ( EventType :: SecurejoinJoinerProgress {
90
81
contact_id : invite. contact_id ( ) ,
@@ -388,9 +379,7 @@ impl BobHandshakeMsg {
388
379
Self :: RequestWithAuth => match invite {
389
380
QrInvite :: Contact { .. } => "vc-request-with-auth" ,
390
381
QrInvite :: Group { .. } => "vg-request-with-auth" ,
391
- QrInvite :: Broadcast { .. } => {
392
- panic ! ( "There is no request-with-auth for broadcasts" )
393
- } // TODO remove panic
382
+ QrInvite :: Broadcast { .. } => "vb-request-with-auth" ,
394
383
} ,
395
384
}
396
385
}
0 commit comments