Commit 21084c4 1 parent c352a44 commit 21084c4 Copy full SHA for 21084c4
File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -350,6 +350,14 @@ pub(crate) async fn receive_imf_inner(
350
350
&& mime_parser. get_header ( HeaderDef :: ChatVerified ) . is_some ( )
351
351
{
352
352
if let Some ( peerstate) = & mut mime_parser. decryption_info . peerstate {
353
+ // NOTE: it might be better to remember ID of the key
354
+ // that we used to decrypt the message, but
355
+ // it is unlikely that default key ever changes
356
+ // as it only happens when user imports a new default key.
357
+ //
358
+ // Backward verification is not security-critical,
359
+ // it is only needed to avoid adding user who does not
360
+ // have our key as verified to protected chats.
353
361
peerstate. backward_verified_key_id =
354
362
Some ( context. get_config_i64 ( Config :: KeyId ) . await ?) . filter ( |& id| id > 0 ) ;
355
363
peerstate. save_to_db ( & context. sql ) . await ?;
You can’t perform that action at this time.
0 commit comments