Add message_auto_delete_time_changed service message.

This commit is contained in:
levlam 2021-02-17 15:45:24 +03:00
parent 35aa4d30a4
commit 4bb09ffd63
3 changed files with 19 additions and 2 deletions

2
td

@ -1 +1 @@
Subproject commit db3875710bcf9f29baa360d91d7b11b0199229a9
Subproject commit 3a657d9072b324aad1143c6abe20a802f3b92cd5

View File

@ -1412,6 +1412,19 @@ class Client::JsonInviteVoiceChatParticipants : public Jsonable {
const Client *client_;
};
class Client::JsonChatSetTtl : public Jsonable {
public:
explicit JsonChatSetTtl(const td_api::messageChatSetTtl *chat_set_ttl) : chat_set_ttl_(chat_set_ttl) {
}
void store(JsonValueScope *scope) const {
auto object = scope->enter_object();
object("message_auto_delete_time", chat_set_ttl_->ttl_);
}
private:
const td_api::messageChatSetTtl *chat_set_ttl_;
};
class Client::JsonCallbackGame : public Jsonable {
public:
void store(JsonValueScope *scope) const {
@ -1752,8 +1765,11 @@ void Client::JsonMessage::store(JsonValueScope *scope) const {
break;
case td_api::messageScreenshotTaken::ID:
break;
case td_api::messageChatSetTtl::ID:
case td_api::messageChatSetTtl::ID: {
auto content = static_cast<const td_api::messageChatSetTtl *>(message_->content.get());
object("message_auto_delete_time_changed", JsonChatSetTtl(content));
break;
}
case td_api::messageUnsupported::ID:
break;
case td_api::messageContactRegistered::ID:

View File

@ -146,6 +146,7 @@ class Client : public WebhookActor::Callback {
class JsonVoiceChatStarted;
class JsonVoiceChatEnded;
class JsonInviteVoiceChatParticipants;
class JsonChatSetTtl;
class JsonUpdateTypes;
class JsonWebhookInfo;
class JsonStickerSet;