File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -1265,7 +1265,11 @@ impl Contact {
1265
1265
} ;
1266
1266
let fingerprint_other = fingerprint_other. to_string ( ) ;
1267
1267
1268
- let stock_message = stock_str:: e2e_available ( context) . await ;
1268
+ let stock_message = if contact. public_key ( context) . await ?. is_some ( ) {
1269
+ stock_str:: e2e_available ( context) . await
1270
+ } else {
1271
+ stock_str:: encr_none ( context) . await
1272
+ } ;
1269
1273
1270
1274
let finger_prints = stock_str:: finger_prints ( context) . await ;
1271
1275
let mut ret = format ! ( "{stock_message}.\n {finger_prints}:" ) ;
Original file line number Diff line number Diff line change @@ -771,6 +771,25 @@ CCCB 5AA9 F6E1 141C 9431
771
771
) ;
772
772
let contact = Contact :: get_by_id ( alice, contact_bob_id) . await ?;
773
773
assert ! ( contact. e2ee_avail( alice) . await ?) ;
774
+
775
+ alice. sql . execute ( "DELETE FROM public_keys" , ( ) ) . await ?;
776
+ let encrinfo = Contact :: get_encrinfo ( alice, contact_bob_id) . await ?;
777
+ assert_eq ! (
778
+ encrinfo,
779
+ "No encryption.
780
+ Fingerprints:
781
+
782
+ Me (alice@example.org):
783
+ 2E6F A2CB 23B5 32D7 2863
784
+ 4B58 64B0 8F61 A9ED 9443
785
+
786
+ bob@example.net (bob@example.net):
787
+ CCCB 5AA9 F6E1 141C 9431
788
+ 65F1 DB18 B18C BCF7 0487"
789
+ ) ;
790
+ let contact = Contact :: get_by_id ( alice, contact_bob_id) . await ?;
791
+ assert ! ( !contact. e2ee_avail( alice) . await ?) ;
792
+
774
793
Ok ( ( ) )
775
794
}
776
795
You can’t perform that action at this time.
0 commit comments