mirror of
https://github.com/chatmail/core.git
synced 2026-04-21 15:36:30 +03:00
fix chat-verified
This commit is contained in:
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -1397,7 +1397,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "lettre"
|
||||
version = "0.9.2"
|
||||
source = "git+https://github.com/deltachat/lettre?branch=feat/mail#db7fe5fc06d4abb4c1cd70534310d1e0b1e79d57"
|
||||
source = "git+https://github.com/deltachat/lettre?branch=feat/mail#00ba9db544059ddd60048f0b85d5052e4bf605da"
|
||||
dependencies = [
|
||||
"base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bufstream 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -1416,7 +1416,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "lettre_email"
|
||||
version = "0.9.2"
|
||||
source = "git+https://github.com/deltachat/lettre?branch=feat/mail#db7fe5fc06d4abb4c1cd70534310d1e0b1e79d57"
|
||||
source = "git+https://github.com/deltachat/lettre?branch=feat/mail#00ba9db544059ddd60048f0b85d5052e4bf605da"
|
||||
dependencies = [
|
||||
"base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"email 0.0.21 (git+https://github.com/deltachat/rust-email)",
|
||||
|
||||
@@ -1272,7 +1272,7 @@ fn create_or_lookup_adhoc_group(
|
||||
context.call_cb(Event::ChatModified(chat_id));
|
||||
|
||||
cleanup(ret_chat_id, ret_chat_id_blocked, chat_id, chat_id_blocked);
|
||||
return Ok(());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn create_group_record(
|
||||
|
||||
@@ -458,7 +458,7 @@ impl Message {
|
||||
};
|
||||
|
||||
let contact = if self.from_id != DC_CONTACT_ID_SELF as libc::c_uint
|
||||
&& ((*chat).typ == Chattype::Group || (*chat).typ == Chattype::VerifiedGroup)
|
||||
&& (chat.typ == Chattype::Group || chat.typ == Chattype::VerifiedGroup)
|
||||
{
|
||||
Contact::get_by_id(context, self.from_id).ok()
|
||||
} else {
|
||||
|
||||
@@ -474,9 +474,12 @@ impl<'a, 'b> MimeFactory<'a, 'b> {
|
||||
let is_encrypted = should_encrypt && force_plaintext == 0;
|
||||
|
||||
// Add gossip headers
|
||||
info!(self.context, "gossip: {:?}", do_gossip);
|
||||
if do_gossip {
|
||||
info!(self.context, "Gossip headers: {:?}", &peerstates);
|
||||
info!(
|
||||
self.context,
|
||||
"gossiping headers for {} peerstates",
|
||||
peerstates.len()
|
||||
);
|
||||
for peerstate in peerstates.iter().filter_map(|(state, _)| state.as_ref()) {
|
||||
if peerstate.peek_key(min_verified).is_some() {
|
||||
if let Some(header) = peerstate.render_gossip_header(min_verified) {
|
||||
@@ -604,6 +607,10 @@ impl<'a, 'b> MimeFactory<'a, 'b> {
|
||||
let mut placeholdertext = None;
|
||||
let mut meta_part = None;
|
||||
|
||||
if chat.typ == Chattype::VerifiedGroup {
|
||||
protected_headers.push(Header::new("Chat-Verified".to_string(), "1".to_string()));
|
||||
}
|
||||
|
||||
if chat.typ == Chattype::Group || chat.typ == Chattype::VerifiedGroup {
|
||||
protected_headers.push(Header::new("Chat-Group-ID".into(), chat.grpid.clone()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user