Don't send GroupNameChanged message if the group name doesn't change in terms of

improve_single_line_input() (#3650)
This commit is contained in:
iequidoo
2022-12-17 18:13:36 -03:00
committed by iequidoo
parent 90c478e58d
commit 03c273e30f
2 changed files with 7 additions and 1 deletions

View File

@@ -17,6 +17,8 @@
- Treat attached PGP keys as peer keys with mutual encryption preference #3832
- fix migration of old databases #3842
- Fix cargo clippy and doc errors after Rust update to 1.66 #3850
- Don't send GroupNameChanged message if the group name doesn't change in terms of
improve_single_line_input() #3852
## 1.103.0

View File

@@ -3052,7 +3052,11 @@ pub async fn set_chat_name(context: &Context, chat_id: ChatId, new_name: &str) -
paramsv![new_name.to_string(), chat_id],
)
.await?;
if chat.is_promoted() && !chat.is_mailing_list() && chat.typ != Chattype::Broadcast {
if chat.is_promoted()
&& !chat.is_mailing_list()
&& chat.typ != Chattype::Broadcast
&& improve_single_line_input(&chat.name) != new_name
{
msg.viewtype = Viewtype::Text;
msg.text = Some(
stock_str::msg_grp_name(context, &chat.name, &new_name, ContactId::SELF).await,