mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-12-28 05:35:51 +01:00
Add Chat.message_auto_delete_time field.
This commit is contained in:
parent
685e6bf87d
commit
90d29edcce
@ -692,6 +692,9 @@ class Client::JsonChat : public Jsonable {
|
||||
LOG(ERROR) << "Pinned unknown, inaccessible or deleted message " << pinned_message_id_;
|
||||
}
|
||||
}
|
||||
if (chat_info->message_auto_delete_time != 0) {
|
||||
object("message_auto_delete_time", chat_info->message_auto_delete_time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -4135,6 +4138,7 @@ void Client::on_update(object_ptr<td_api::Object> result) {
|
||||
chat_info->title = std::move(chat->title_);
|
||||
chat_info->photo = std::move(chat->photo_);
|
||||
chat_info->permissions = std::move(chat->permissions_);
|
||||
chat_info->message_auto_delete_time = chat->message_ttl_setting_;
|
||||
break;
|
||||
}
|
||||
case td_api::updateChatTitle::ID: {
|
||||
@ -4158,6 +4162,13 @@ void Client::on_update(object_ptr<td_api::Object> result) {
|
||||
chat_info->permissions = std::move(update->permissions_);
|
||||
break;
|
||||
}
|
||||
case td_api::updateChatMessageTtlSetting::ID: {
|
||||
auto update = move_object_as<td_api::updateChatMessageTtlSetting>(result);
|
||||
auto chat_info = add_chat(update->chat_id_);
|
||||
CHECK(chat_info->type != ChatInfo::Type::Unknown);
|
||||
chat_info->message_auto_delete_time = update->message_ttl_setting_;
|
||||
break;
|
||||
}
|
||||
case td_api::updateUser::ID: {
|
||||
auto update = move_object_as<td_api::updateUser>(result);
|
||||
add_user(users_, std::move(update->user_));
|
||||
|
@ -595,6 +595,7 @@ class Client : public WebhookActor::Callback {
|
||||
enum class Type { Private, Group, Supergroup, Unknown };
|
||||
Type type = Type::Unknown;
|
||||
td::string title;
|
||||
int32 message_auto_delete_time = 0;
|
||||
object_ptr<td_api::chatPhotoInfo> photo;
|
||||
object_ptr<td_api::chatPermissions> permissions;
|
||||
union {
|
||||
|
Loading…
Reference in New Issue
Block a user