mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
fix: treat reset state as encryption not preferred
This will still degrade 1:1 chats to no encryption, but will not cause the group to disable encryption simply because one user got into reset state.
This commit is contained in:
@@ -67,13 +67,8 @@ impl EncryptHelper {
|
|||||||
"peerstate for {:?} is {}", addr, peerstate.prefer_encrypt
|
"peerstate for {:?} is {}", addr, peerstate.prefer_encrypt
|
||||||
);
|
);
|
||||||
match peerstate.prefer_encrypt {
|
match peerstate.prefer_encrypt {
|
||||||
EncryptPreference::NoPreference => {}
|
EncryptPreference::NoPreference | EncryptPreference::Reset => {}
|
||||||
EncryptPreference::Mutual => prefer_encrypt_count += 1,
|
EncryptPreference::Mutual => prefer_encrypt_count += 1,
|
||||||
EncryptPreference::Reset => {
|
|
||||||
if !e2ee_guaranteed {
|
|
||||||
return Ok(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
|
|||||||
Reference in New Issue
Block a user