Rename last_msg_in_chat_encrypted into parent_is_encrypted

This commit is contained in:
Alexander Krotov
2020-01-11 21:59:51 +03:00
committed by holger krekel
parent 36a2569537
commit e1ca6b5181

View File

@@ -202,7 +202,7 @@ impl Chat {
.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(
context,
"SELECT param \
@@ -425,9 +425,7 @@ impl Chat {
}
}
if can_encrypt
&& (all_mutual || self.last_msg_in_chat_encrypted(context, &context.sql))
{
if can_encrypt && (all_mutual || self.parent_is_encrypted(context, &context.sql)) {
msg.param.set_int(Param::GuaranteeE2ee, 1);
}
}