mirror of
https://github.com/chatmail/core.git
synced 2026-05-21 15:56:30 +03:00
Notify a removed member that they were removed
This commit is contained in:
@@ -1433,6 +1433,7 @@ impl MimeFactory {
|
||||
match command {
|
||||
SystemMessage::MemberRemovedFromGroup => {
|
||||
let email_to_remove = msg.param.get(Param::Arg).unwrap_or_default();
|
||||
let fingerprint_to_remove = msg.param.get(Param::Arg2).unwrap_or_default();
|
||||
|
||||
if email_to_remove
|
||||
== context
|
||||
@@ -1453,6 +1454,14 @@ impl MimeFactory {
|
||||
.into(),
|
||||
));
|
||||
}
|
||||
|
||||
if !fingerprint_to_remove.is_empty() {
|
||||
headers.push((
|
||||
"Chat-Group-Member-Removed-Fpr",
|
||||
mail_builder::headers::raw::Raw::new(fingerprint_to_remove.to_string())
|
||||
.into(),
|
||||
));
|
||||
}
|
||||
}
|
||||
SystemMessage::MemberAddedToGroup => {
|
||||
// TODO: lookup the contact by ID rather than email address.
|
||||
|
||||
Reference in New Issue
Block a user