mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2025-01-12 04:55:51 +01:00
Add setUserEmojiStatus.
This commit is contained in:
parent
bcc968d73c
commit
c443a14a23
@ -268,6 +268,7 @@ bool Client::init_methods() {
|
|||||||
methods_.emplace("editchatsubscriptioninvitelink", &Client::process_edit_chat_subscription_invite_link_query);
|
methods_.emplace("editchatsubscriptioninvitelink", &Client::process_edit_chat_subscription_invite_link_query);
|
||||||
methods_.emplace("revokechatinvitelink", &Client::process_revoke_chat_invite_link_query);
|
methods_.emplace("revokechatinvitelink", &Client::process_revoke_chat_invite_link_query);
|
||||||
methods_.emplace("getbusinessconnection", &Client::process_get_business_connection_query);
|
methods_.emplace("getbusinessconnection", &Client::process_get_business_connection_query);
|
||||||
|
methods_.emplace("setuseremojistatus", &Client::process_set_user_emoji_status_query);
|
||||||
methods_.emplace("getchat", &Client::process_get_chat_query);
|
methods_.emplace("getchat", &Client::process_get_chat_query);
|
||||||
methods_.emplace("setchatphoto", &Client::process_set_chat_photo_query);
|
methods_.emplace("setchatphoto", &Client::process_set_chat_photo_query);
|
||||||
methods_.emplace("deletechatphoto", &Client::process_delete_chat_photo_query);
|
methods_.emplace("deletechatphoto", &Client::process_delete_chat_photo_query);
|
||||||
@ -11487,6 +11488,23 @@ td::Status Client::process_get_business_connection_query(PromisedQueryPtr &query
|
|||||||
return td::Status::OK();
|
return td::Status::OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
td::Status Client::process_set_user_emoji_status_query(PromisedQueryPtr &query) {
|
||||||
|
TRY_RESULT(user_id, get_user_id(query.get()));
|
||||||
|
auto emoji_status_custom_emoji_id = td::to_integer<int64>(query->arg("emoji_status_custom_emoji_id"));
|
||||||
|
auto emoji_status_expiration_date = td::to_integer<int32>(query->arg("emoji_status_expiration_date"));
|
||||||
|
check_user(
|
||||||
|
user_id, std::move(query),
|
||||||
|
[this, user_id, emoji_status_custom_emoji_id, emoji_status_expiration_date](PromisedQueryPtr query) mutable {
|
||||||
|
send_request(make_object<td_api::setUserEmojiStatus>(
|
||||||
|
user_id, emoji_status_custom_emoji_id == 0
|
||||||
|
? nullptr
|
||||||
|
: make_object<td_api::emojiStatus>(emoji_status_custom_emoji_id,
|
||||||
|
emoji_status_expiration_date)),
|
||||||
|
td::make_unique<TdOnOkQueryCallback>(std::move(query)));
|
||||||
|
});
|
||||||
|
return td::Status::OK();
|
||||||
|
}
|
||||||
|
|
||||||
td::Status Client::process_get_chat_query(PromisedQueryPtr &query) {
|
td::Status Client::process_get_chat_query(PromisedQueryPtr &query) {
|
||||||
auto chat_id = query->arg("chat_id");
|
auto chat_id = query->arg("chat_id");
|
||||||
|
|
||||||
|
@ -698,6 +698,7 @@ class Client final : public WebhookActor::Callback {
|
|||||||
td::Status process_edit_chat_subscription_invite_link_query(PromisedQueryPtr &query);
|
td::Status process_edit_chat_subscription_invite_link_query(PromisedQueryPtr &query);
|
||||||
td::Status process_revoke_chat_invite_link_query(PromisedQueryPtr &query);
|
td::Status process_revoke_chat_invite_link_query(PromisedQueryPtr &query);
|
||||||
td::Status process_get_business_connection_query(PromisedQueryPtr &query);
|
td::Status process_get_business_connection_query(PromisedQueryPtr &query);
|
||||||
|
td::Status process_set_user_emoji_status_query(PromisedQueryPtr &query);
|
||||||
td::Status process_get_chat_query(PromisedQueryPtr &query);
|
td::Status process_get_chat_query(PromisedQueryPtr &query);
|
||||||
td::Status process_set_chat_photo_query(PromisedQueryPtr &query);
|
td::Status process_set_chat_photo_query(PromisedQueryPtr &query);
|
||||||
td::Status process_delete_chat_photo_query(PromisedQueryPtr &query);
|
td::Status process_delete_chat_photo_query(PromisedQueryPtr &query);
|
||||||
|
Loading…
Reference in New Issue
Block a user