Add td_api::setChatSlowModeDelay.
GitOrigin-RevId: 0a3760d41bdcadac62b78222eef7efd8e5769b9f
This commit is contained in:
parent
119225ccef
commit
26fa164e9e
@ -3503,6 +3503,9 @@ setChatDiscussionGroup chat_id:int53 discussion_chat_id:int53 = Ok;
|
||||
//@description Changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.can_set_location to check whether the method is allowed to use @chat_id Chat identifier @location New location for the chat; must be valid and not null
|
||||
setChatLocation chat_id:int53 location:chatLocation = Ok;
|
||||
|
||||
//@description Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members rights @chat_id Chat identifier @slow_mode_delay New slow mode delay for the chat; must be one of 0, 10, 30, 60, 300, 900, 3600
|
||||
setChatSlowModeDelay chat_id:int53 slow_mode_delay:int32 = Ok;
|
||||
|
||||
//@description Pins a message in a chat; requires can_pin_messages rights @chat_id Identifier of the chat @message_id Identifier of the new pinned message @disable_notification True, if there should be no notification about the pinned message
|
||||
pinChatMessage chat_id:int53 message_id:int53 disable_notification:Bool = Ok;
|
||||
|
||||
|
Binary file not shown.
@ -6069,6 +6069,13 @@ void Td::on_request(uint64 id, td_api::setChatLocation &request) {
|
||||
std::move(promise));
|
||||
}
|
||||
|
||||
void Td::on_request(uint64 id, const td_api::setChatSlowModeDelay &request) {
|
||||
CHECK_IS_USER();
|
||||
CREATE_OK_REQUEST_PROMISE();
|
||||
contacts_manager_->set_channel_slow_mode_delay(DialogId(request.chat_id_), request.slow_mode_delay_,
|
||||
std::move(promise));
|
||||
}
|
||||
|
||||
void Td::on_request(uint64 id, const td_api::pinChatMessage &request) {
|
||||
CREATE_OK_REQUEST_PROMISE();
|
||||
messages_manager_->pin_dialog_message(DialogId(request.chat_id_), MessageId(request.message_id_),
|
||||
|
@ -676,6 +676,8 @@ class Td final : public NetQueryCallback {
|
||||
|
||||
void on_request(uint64 id, td_api::setChatLocation &request);
|
||||
|
||||
void on_request(uint64 id, const td_api::setChatSlowModeDelay &request);
|
||||
|
||||
void on_request(uint64 id, const td_api::pinChatMessage &request);
|
||||
|
||||
void on_request(uint64 id, const td_api::unpinChatMessage &request);
|
||||
|
@ -3534,6 +3534,13 @@ class CliClient final : public Actor {
|
||||
std::tie(latitude, longitude) = split(args);
|
||||
send_request(td_api::make_object<td_api::setChatLocation>(
|
||||
as_chat_id(chat_id), td_api::make_object<td_api::chatLocation>(as_location(latitude, longitude), "address")));
|
||||
} else if (op == "scsmd") {
|
||||
string chat_id;
|
||||
string slow_mode_delay;
|
||||
|
||||
std::tie(chat_id, slow_mode_delay) = split(args);
|
||||
send_request(
|
||||
td_api::make_object<td_api::setChatSlowModeDelay>(as_chat_id(chat_id), to_integer<int32>(slow_mode_delay)));
|
||||
} else if (op == "pcm" || op == "pcms") {
|
||||
string chat_id;
|
||||
string message_id;
|
||||
|
Reference in New Issue
Block a user