mirror of
https://github.com/chatmail/core.git
synced 2026-05-06 16:36:59 +03:00
fix: lowercase the address in member added/removed messages
This commit is contained in:
@@ -3461,8 +3461,8 @@ pub(crate) async fn add_contact_to_chat_ex(
|
|||||||
if chat.typ == Chattype::Group && chat.is_promoted() {
|
if chat.typ == Chattype::Group && chat.is_promoted() {
|
||||||
msg.viewtype = Viewtype::Text;
|
msg.viewtype = Viewtype::Text;
|
||||||
|
|
||||||
let contact_addr = contact.get_addr();
|
let contact_addr = contact.get_addr().to_lowercase();
|
||||||
msg.text = stock_str::msg_add_member_local(context, contact_addr, ContactId::SELF).await;
|
msg.text = stock_str::msg_add_member_local(context, &contact_addr, ContactId::SELF).await;
|
||||||
msg.param.set_cmd(SystemMessage::MemberAddedToGroup);
|
msg.param.set_cmd(SystemMessage::MemberAddedToGroup);
|
||||||
msg.param.set(Param::Arg, contact_addr);
|
msg.param.set(Param::Arg, contact_addr);
|
||||||
msg.param.set_int(Param::Arg2, from_handshake.into());
|
msg.param.set_int(Param::Arg2, from_handshake.into());
|
||||||
@@ -3633,7 +3633,7 @@ pub async fn remove_contact_from_chat(
|
|||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
msg.param.set_cmd(SystemMessage::MemberRemovedFromGroup);
|
msg.param.set_cmd(SystemMessage::MemberRemovedFromGroup);
|
||||||
msg.param.set(Param::Arg, contact.get_addr());
|
msg.param.set(Param::Arg, contact.get_addr().to_lowercase());
|
||||||
msg.id = send_msg(context, chat_id, &mut msg).await?;
|
msg.id = send_msg(context, chat_id, &mut msg).await?;
|
||||||
} else {
|
} else {
|
||||||
sync = Sync;
|
sync = Sync;
|
||||||
|
|||||||
Reference in New Issue
Block a user