mirror of
https://github.com/chatmail/core.git
synced 2026-04-02 05:22:14 +03:00
feat: chat::rename_ex: Don't send sync message if usual message is sent
It's not necessary and in other places like add_contact_to_chat_ex() sync messages are also sent only if there are no system messages sent like MemberAddedToGroup.
This commit is contained in:
@@ -3682,7 +3682,7 @@ pub async fn set_chat_name(context: &Context, chat_id: ChatId, new_name: &str) -
|
||||
|
||||
async fn rename_ex(
|
||||
context: &Context,
|
||||
sync: sync::Sync,
|
||||
mut sync: sync::Sync,
|
||||
chat_id: ChatId,
|
||||
new_name: &str,
|
||||
) -> Result<()> {
|
||||
@@ -3728,6 +3728,7 @@ async fn rename_ex(
|
||||
}
|
||||
msg.id = send_msg(context, chat_id, &mut msg).await?;
|
||||
context.emit_msgs_changed(chat_id, msg.id);
|
||||
sync = Nosync;
|
||||
}
|
||||
context.emit_event(EventType::ChatModified(chat_id));
|
||||
success = true;
|
||||
|
||||
Reference in New Issue
Block a user