@@ -793,22 +793,6 @@ pub async fn core_crypto_deferred_init(
793
793
. into ( ) )
794
794
}
795
795
796
- #[ allow( dead_code, unused_variables) ]
797
- impl CoreCrypto {
798
- async fn lower_cfg ( & self , cfg : ConversationConfiguration ) -> CoreCryptoResult < MlsConversationConfiguration > {
799
- let mut lower_cfg = MlsConversationConfiguration {
800
- custom : cfg. custom . into ( ) ,
801
- ciphersuite : cfg. ciphersuite . into ( ) ,
802
- ..Default :: default ( )
803
- } ;
804
- self . central
805
- . lock ( )
806
- . await
807
- . set_raw_external_senders ( & mut lower_cfg, cfg. external_senders ) ?;
808
- Ok ( lower_cfg)
809
- }
810
- }
811
-
812
796
#[ allow( dead_code, unused_variables) ]
813
797
#[ uniffi:: export]
814
798
impl CoreCrypto {
@@ -986,15 +970,17 @@ impl CoreCrypto {
986
970
creator_credential_type : MlsCredentialType ,
987
971
config : ConversationConfiguration ,
988
972
) -> CoreCryptoResult < ( ) > {
989
- Ok ( self
990
- . central
991
- . lock ( )
992
- . await
993
- . new_conversation (
994
- & conversation_id,
995
- creator_credential_type. into ( ) ,
996
- self . lower_cfg ( config) . await ?,
997
- )
973
+ let mut central = self . central . lock ( ) . await ;
974
+ let mut lower_cfg = MlsConversationConfiguration {
975
+ custom : config. custom . into ( ) ,
976
+ ciphersuite : config. ciphersuite . into ( ) ,
977
+ ..Default :: default ( )
978
+ } ;
979
+
980
+ central. set_raw_external_senders ( & mut lower_cfg, config. external_senders ) ?;
981
+
982
+ Ok ( central
983
+ . new_conversation ( & conversation_id, creator_credential_type. into ( ) , lower_cfg)
998
984
. await ?)
999
985
}
1000
986
0 commit comments