feat: Add "Auto-Submitted: auto-replied" header to appropriate SecureJoin messages

I.e. to all messages except "v{c,g}-request" as they sent out on a QR code scanning which is a
manual action and "vg-member-added" as formally this message is auto-submitted, but the member
addition is a result of an explicit user action. Otherwise it would be strange to have the
Auto-Submitted header in "member-added" messages of verified groups only.
This commit is contained in:
iequidoo
2024-08-03 16:06:56 -03:00
committed by iequidoo
parent f912bc78e6
commit af77c0c987
2 changed files with 17 additions and 0 deletions

View File

@@ -1193,6 +1193,12 @@ impl MimeFactory {
if let Some(id) = msg.param.get(Param::Arg4) {
headers.push(Header::new("Secure-Join-Group".into(), id.into()));
};
if step != "vg-request" && step != "vc-request" {
headers.push(Header::new(
"Auto-Submitted".to_string(),
"auto-replied".to_string(),
));
}
}
}
SystemMessage::ChatProtectionEnabled => {