mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2025-01-01 07:05:49 +01:00
Add optional web_app_name to WriteAccessAllowed.
This commit is contained in:
parent
7b2acc80be
commit
4dc418b8d3
@ -1732,6 +1732,22 @@ class Client::JsonChatSetMessageAutoDeleteTime final : public td::Jsonable {
|
|||||||
const td_api::messageChatSetMessageAutoDeleteTime *chat_set_message_auto_delete_time_;
|
const td_api::messageChatSetMessageAutoDeleteTime *chat_set_message_auto_delete_time_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class Client::JsonWriteAccessAllowed final : public td::Jsonable {
|
||||||
|
public:
|
||||||
|
explicit JsonWriteAccessAllowed(const td_api::messageBotWriteAccessAllowed *write_access_allowed)
|
||||||
|
: write_access_allowed_(write_access_allowed) {
|
||||||
|
}
|
||||||
|
void store(td::JsonValueScope *scope) const {
|
||||||
|
auto object = scope->enter_object();
|
||||||
|
if (write_access_allowed_->web_app_ != nullptr) {
|
||||||
|
object("web_app_name", write_access_allowed_->web_app_->short_name_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
const td_api::messageBotWriteAccessAllowed *write_access_allowed_;
|
||||||
|
};
|
||||||
|
|
||||||
class Client::JsonUserShared final : public td::Jsonable {
|
class Client::JsonUserShared final : public td::Jsonable {
|
||||||
public:
|
public:
|
||||||
explicit JsonUserShared(const td_api::messageUserShared *user_shared) : user_shared_(user_shared) {
|
explicit JsonUserShared(const td_api::messageUserShared *user_shared) : user_shared_(user_shared) {
|
||||||
@ -2231,9 +2247,11 @@ void Client::JsonMessage::store(td::JsonValueScope *scope) const {
|
|||||||
break;
|
break;
|
||||||
case td_api::messageSuggestProfilePhoto::ID:
|
case td_api::messageSuggestProfilePhoto::ID:
|
||||||
break;
|
break;
|
||||||
case td_api::messageBotWriteAccessAllowed::ID:
|
case td_api::messageBotWriteAccessAllowed::ID: {
|
||||||
object("write_access_allowed", JsonEmptyObject());
|
auto content = static_cast<const td_api::messageBotWriteAccessAllowed *>(message_->content.get());
|
||||||
|
object("write_access_allowed", JsonWriteAccessAllowed(content));
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case td_api::messageUserShared::ID: {
|
case td_api::messageUserShared::ID: {
|
||||||
auto content = static_cast<const td_api::messageUserShared *>(message_->content.get());
|
auto content = static_cast<const td_api::messageUserShared *>(message_->content.get());
|
||||||
object("user_shared", JsonUserShared(content));
|
object("user_shared", JsonUserShared(content));
|
||||||
|
@ -159,6 +159,7 @@ class Client final : public WebhookActor::Callback {
|
|||||||
class JsonVideoChatEnded;
|
class JsonVideoChatEnded;
|
||||||
class JsonInviteVideoChatParticipants;
|
class JsonInviteVideoChatParticipants;
|
||||||
class JsonChatSetMessageAutoDeleteTime;
|
class JsonChatSetMessageAutoDeleteTime;
|
||||||
|
class JsonWriteAccessAllowed;
|
||||||
class JsonUserShared;
|
class JsonUserShared;
|
||||||
class JsonChatShared;
|
class JsonChatShared;
|
||||||
class JsonUpdateTypes;
|
class JsonUpdateTypes;
|
||||||
|
Loading…
Reference in New Issue
Block a user