mirror of
https://github.com/chatmail/core.git
synced 2026-04-25 09:26:30 +03:00
Fix failure to decrypt first message to self after key change
The problem was in the handle_fingerprint_change() function which attempted to add a warning about fingerprint change to all chats with the contact. This failed because of the SQL query failing to find the contact for self in the `contacts` table. So the warning was not added, but at the same time the whole decryption process failed. The fix is to skip handle_fingerprint_change() for self addreses.
This commit is contained in:
@@ -267,6 +267,11 @@ impl Peerstate {
|
||||
context: &Context,
|
||||
timestamp: i64,
|
||||
) -> Result<()> {
|
||||
if context.is_self_addr(&self.addr).await? {
|
||||
// Do not try to search all the chats with self.
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
if self.fingerprint_changed {
|
||||
if let Some(contact_id) = context
|
||||
.sql
|
||||
|
||||
Reference in New Issue
Block a user