mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 12:56:30 +03:00
Rename last_msg_in_chat_encrypted into parent_is_encrypted
This commit is contained in:
committed by
holger krekel
parent
36a2569537
commit
e1ca6b5181
@@ -202,7 +202,7 @@ impl Chat {
|
|||||||
.ok()
|
.ok()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn last_msg_in_chat_encrypted(&self, context: &Context, sql: &Sql) -> bool {
|
fn parent_is_encrypted(&self, context: &Context, sql: &Sql) -> bool {
|
||||||
let packed: Option<String> = sql.query_get_value(
|
let packed: Option<String> = sql.query_get_value(
|
||||||
context,
|
context,
|
||||||
"SELECT param \
|
"SELECT param \
|
||||||
@@ -425,9 +425,7 @@ impl Chat {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if can_encrypt
|
if can_encrypt && (all_mutual || self.parent_is_encrypted(context, &context.sql)) {
|
||||||
&& (all_mutual || self.last_msg_in_chat_encrypted(context, &context.sql))
|
|
||||||
{
|
|
||||||
msg.param.set_int(Param::GuaranteeE2ee, 1);
|
msg.param.set_int(Param::GuaranteeE2ee, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user