Update rights check for setChatMessageTtl.
This commit is contained in:
parent
70cfbab277
commit
2f8d60669a
@ -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;
|
||||
|
@ -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"));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user