mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +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(
|
async fn rename_ex(
|
||||||
context: &Context,
|
context: &Context,
|
||||||
sync: sync::Sync,
|
mut sync: sync::Sync,
|
||||||
chat_id: ChatId,
|
chat_id: ChatId,
|
||||||
new_name: &str,
|
new_name: &str,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
@@ -3728,6 +3728,7 @@ async fn rename_ex(
|
|||||||
}
|
}
|
||||||
msg.id = send_msg(context, chat_id, &mut msg).await?;
|
msg.id = send_msg(context, chat_id, &mut msg).await?;
|
||||||
context.emit_msgs_changed(chat_id, msg.id);
|
context.emit_msgs_changed(chat_id, msg.id);
|
||||||
|
sync = Nosync;
|
||||||
}
|
}
|
||||||
context.emit_event(EventType::ChatModified(chat_id));
|
context.emit_event(EventType::ChatModified(chat_id));
|
||||||
success = true;
|
success = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user