mirror of
https://github.com/chatmail/core.git
synced 2026-05-05 14:26:30 +03:00
fix: use different member added/removal messages locally and on the network
This commit adds new stock strings "I added member ...", "I removed member ..." and "I left the group" that are sent over the network and are visible in classic MUAs like Thunderbird. Member name in these messages uses authname instead of the display name, so the name set locally does not get leaked when a member is added or removed.
This commit is contained in:
@@ -1691,9 +1691,9 @@ async fn apply_group_changes(
|
||||
}
|
||||
|
||||
better_msg = if contact_id == from_id {
|
||||
Some(stock_str::msg_group_left(context, from_id).await)
|
||||
Some(stock_str::msg_group_left_local(context, from_id).await)
|
||||
} else {
|
||||
Some(stock_str::msg_del_member(context, removed_addr, from_id).await)
|
||||
Some(stock_str::msg_del_member_local(context, removed_addr, from_id).await)
|
||||
};
|
||||
} else {
|
||||
info!(
|
||||
@@ -1718,7 +1718,7 @@ async fn apply_group_changes(
|
||||
}
|
||||
}
|
||||
|
||||
better_msg = Some(stock_str::msg_add_member(context, added_addr, from_id).await);
|
||||
better_msg = Some(stock_str::msg_add_member_local(context, added_addr, from_id).await);
|
||||
} else {
|
||||
info!(context, "Ignoring addition of {added_addr:?} to {chat_id}.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user