File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -507,7 +507,11 @@ impl Config {
507507 pub ( crate ) fn is_synced ( & self ) -> bool {
508508 matches ! (
509509 self ,
510- Self :: Displayname | Self :: MdnsEnabled | Self :: Selfavatar | Self :: Selfstatus ,
510+ Self :: Displayname
511+ | Self :: MdnsEnabled
512+ | Self :: Selfavatar
513+ | Self :: Selfstatus
514+ | Self :: ForceEncryption ,
511515 )
512516 }
513517
Original file line number Diff line number Diff line change @@ -810,4 +810,23 @@ mod tests {
810810 assert_eq ! ( msg. text, "Member Me added by alice@example.org." ) ;
811811 Ok ( ( ) )
812812 }
813+
814+ /// Tests that "force encryption" setting is synced.
815+ #[ tokio:: test( flavor = "multi_thread" , worker_threads = 2 ) ]
816+ async fn test_sync_force_encryption ( ) -> Result < ( ) > {
817+ let mut tcm = TestContextManager :: new ( ) ;
818+ let alice = & tcm. alice ( ) . await ;
819+ let alice2 = & tcm. alice ( ) . await ;
820+ alice. set_config_bool ( Config :: SyncMsgs , true ) . await ?;
821+ alice2. set_config_bool ( Config :: SyncMsgs , true ) . await ?;
822+
823+ assert_eq ! ( alice. get_config_bool( Config :: ForceEncryption ) . await ?, true ) ;
824+ alice2
825+ . set_config_bool ( Config :: ForceEncryption , false )
826+ . await ?;
827+ test_utils:: sync ( alice2, alice) . await ;
828+ assert_eq ! ( alice. get_config_bool( Config :: ForceEncryption ) . await ?, false ) ;
829+
830+ Ok ( ( ) )
831+ }
813832}
You can’t perform that action at this time.
0 commit comments