From 76aaecb8f242d0a86a6649e456638cdb9a76f203 Mon Sep 17 00:00:00 2001 From: iequidoo Date: Wed, 25 Jan 2023 17:11:02 -0300 Subject: [PATCH] Add gossips to all Securejoin messages (#3836) It worked before only because of the gossip-by-timeout logic in the branch above. And that is why not always. --- src/mimefactory.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mimefactory.rs b/src/mimefactory.rs index 7b953a6c9..ea552ca7d 100644 --- a/src/mimefactory.rs +++ b/src/mimefactory.rs @@ -364,7 +364,11 @@ impl<'a> MimeFactory<'a> { if time() > gossiped_timestamp + (2 * 24 * 60 * 60) { Ok(true) } else { - Ok(self.msg.param.get_cmd() == SystemMessage::MemberAddedToGroup) + let cmd = self.msg.param.get_cmd(); + // Do gossip in all Securejoin messages not to complicate the code. There's no + // need in gossips in "vg-auth-required" messages f.e., but let them be. + Ok(cmd == SystemMessage::MemberAddedToGroup + || cmd == SystemMessage::SecurejoinMessage) } } Loaded::Mdn { .. } => Ok(false),