From 15099787383916c7ce44dbbd00474d9f5aa5080a Mon Sep 17 00:00:00 2001 From: iequidoo Date: Wed, 15 Nov 2023 23:47:17 -0300 Subject: [PATCH] fix: chat::rename_ex(): Sync improved chat name to other devices Other devices should get the same chat name as the currently used device, i.e. the name a user sees after renaming the chat. This fix is minor because `improve_single_line_input()` logic isn't going to change often, but still, and also it simplifies the code. --- src/chat.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index fa76e0b7f..f0336b443 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -3692,7 +3692,6 @@ async fn rename_ex( chat_id: ChatId, new_name: &str, ) -> Result<()> { - let sync_name = new_name; let new_name = improve_single_line_input(new_name); /* the function only sets the names of group chats; normal chats get their names from the contacts */ let mut success = false; @@ -3745,7 +3744,7 @@ async fn rename_ex( bail!("Failed to set name"); } if sync.into() && chat.name != new_name { - let sync_name = sync_name.to_string(); + let sync_name = new_name.to_string(); chat.sync(context, SyncAction::Rename(sync_name)) .await .log_err(context)