diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 9f02e0cd1..e3d23b201 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -5671,7 +5671,7 @@ setChatTitle chat_id:int53 title:string = Ok; //@chat_id Chat identifier @photo New chat photo; pass null to delete the chat photo setChatPhoto chat_id:int53 photo:InputChatPhoto = Ok; -//@description Changes the message TTL in a chat. Requires can_delete_messages administrator right in basic groups, supergroups and channels +//@description Changes the message TTL in a chat. Requires change_info administrator right in basic groups, supergroups and channels //-Message TTL can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram). //@chat_id Chat identifier @ttl New TTL value, in seconds; unless the chat is secret, it must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically setChatMessageTtl chat_id:int53 ttl:int32 = Ok; diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index be129813d..80f79d598 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -34569,7 +34569,7 @@ void MessagesManager::set_dialog_message_ttl(DialogId dialog_id, int32 ttl, Prom case DialogType::Chat: { auto chat_id = dialog_id.get_chat_id(); auto status = td_->contacts_manager_->get_chat_permissions(chat_id); - if (!status.can_delete_messages()) { + if (!status.can_change_info_and_settings()) { return promise.set_error( Status::Error(400, "Not enough rights to change message auto-delete time in the chat")); }