refactor: Merge msg_group_left_local into msg_del_member_local (#8575)

Follow-up to #8562

Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
This commit is contained in:
Jagoda Estera Ślązak
2026-08-13 14:08:27 +02:00
committed by GitHub
parent 56a99c227a
commit 1edbfa1024
4 changed files with 18 additions and 26 deletions

View File

@@ -4275,12 +4275,8 @@ async fn send_member_removal_msg(
) -> Result<MsgId> {
let mut msg = Message::new(Viewtype::Text);
if contact_id == ContactId::SELF {
if chat.typ == Chattype::InBroadcast {
msg.text = stock_str::msg_you_left_broadcast(context);
} else {
msg.text = stock_str::msg_group_left_local(context, ContactId::SELF).await;
}
if contact_id == ContactId::SELF && chat.typ == Chattype::InBroadcast {
msg.text = stock_str::msg_you_left_broadcast(context);
} else {
msg.text = stock_str::msg_del_member_local(context, contact_id, ContactId::SELF).await;
}