mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-12-29 13:45:49 +01:00
Add unpinAllGeneralForumTopicMessages.
This commit is contained in:
parent
afd30f2cfa
commit
f4422f5976
@ -276,6 +276,7 @@ bool Client::init_methods() {
|
||||
methods_.emplace("reopengeneralforumtopic", &Client::process_reopen_general_forum_topic_query);
|
||||
methods_.emplace("hidegeneralforumtopic", &Client::process_hide_general_forum_topic_query);
|
||||
methods_.emplace("unhidegeneralforumtopic", &Client::process_unhide_general_forum_topic_query);
|
||||
methods_.emplace("unpinallgeneralforumtopicmessages", &Client::process_unpin_all_general_forum_topic_messages_query);
|
||||
methods_.emplace("getchatmember", &Client::process_get_chat_member_query);
|
||||
methods_.emplace("getchatadministrators", &Client::process_get_chat_administrators_query);
|
||||
methods_.emplace("getchatmembercount", &Client::process_get_chat_member_count_query);
|
||||
@ -9102,6 +9103,16 @@ td::Status Client::process_unhide_general_forum_topic_query(PromisedQueryPtr &qu
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status Client::process_unpin_all_general_forum_topic_messages_query(PromisedQueryPtr &query) {
|
||||
auto chat_id = query->arg("chat_id");
|
||||
|
||||
check_chat(chat_id, AccessRights::Write, std::move(query), [this](int64 chat_id, PromisedQueryPtr query) {
|
||||
send_request(make_object<td_api::unpinAllMessageThreadMessages>(chat_id, GENERAL_MESSAGE_THREAD_ID),
|
||||
td::make_unique<TdOnOkQueryCallback>(std::move(query)));
|
||||
});
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status Client::process_get_chat_member_query(PromisedQueryPtr &query) {
|
||||
auto chat_id = query->arg("chat_id");
|
||||
TRY_RESULT(user_id, get_user_id(query.get()));
|
||||
|
@ -590,6 +590,7 @@ class Client final : public WebhookActor::Callback {
|
||||
td::Status process_reopen_general_forum_topic_query(PromisedQueryPtr &query);
|
||||
td::Status process_hide_general_forum_topic_query(PromisedQueryPtr &query);
|
||||
td::Status process_unhide_general_forum_topic_query(PromisedQueryPtr &query);
|
||||
td::Status process_unpin_all_general_forum_topic_messages_query(PromisedQueryPtr &query);
|
||||
td::Status process_get_chat_member_query(PromisedQueryPtr &query);
|
||||
td::Status process_get_chat_administrators_query(PromisedQueryPtr &query);
|
||||
td::Status process_get_chat_member_count_query(PromisedQueryPtr &query);
|
||||
|
Loading…
Reference in New Issue
Block a user