mirror of
https://github.com/chatmail/core.git
synced 2026-04-25 01:16:29 +03:00
Optimize Autocrypt gossip
Update gossiped_timestamp when someone else sends autocrypt gossip in the group, so we postpone sending gossip again ourselves. - Warn about failures to parse Autocrypt-Gossip header - Move gossip-related methods into ChatId impl - Fix a "gossi_pp_ed" typo
This commit is contained in:
@@ -361,7 +361,7 @@ impl<'a> MimeFactory<'a> {
|
||||
match &self.loaded {
|
||||
Loaded::Message { chat } => {
|
||||
// beside key- and member-changes, force re-gossip every 48 hours
|
||||
let gossiped_timestamp = chat.get_gossiped_timestamp(context).await?;
|
||||
let gossiped_timestamp = chat.id.get_gossiped_timestamp(context).await?;
|
||||
if time() > gossiped_timestamp + (2 * 24 * 60 * 60) {
|
||||
Ok(true)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user