mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 22:46:29 +03:00
fix chat-verified
This commit is contained in:
@@ -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