mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-11-08 21:37:04 +01:00
Add field Chat.has_protected_content.
This commit is contained in:
parent
5d118ebf6b
commit
9f8606b612
@ -728,6 +728,9 @@ class Client::JsonChat : public Jsonable {
|
|||||||
if (chat_info->message_auto_delete_time != 0) {
|
if (chat_info->message_auto_delete_time != 0) {
|
||||||
object("message_auto_delete_time", chat_info->message_auto_delete_time);
|
object("message_auto_delete_time", chat_info->message_auto_delete_time);
|
||||||
}
|
}
|
||||||
|
if (chat_info->has_protected_content) {
|
||||||
|
object("has_protected_content", td::JsonTrue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4303,6 +4306,7 @@ void Client::on_update(object_ptr<td_api::Object> result) {
|
|||||||
chat_info->photo = std::move(chat->photo_);
|
chat_info->photo = std::move(chat->photo_);
|
||||||
chat_info->permissions = std::move(chat->permissions_);
|
chat_info->permissions = std::move(chat->permissions_);
|
||||||
chat_info->message_auto_delete_time = chat->message_ttl_setting_;
|
chat_info->message_auto_delete_time = chat->message_ttl_setting_;
|
||||||
|
chat_info->has_protected_content = chat->has_protected_content_;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case td_api::updateChatTitle::ID: {
|
case td_api::updateChatTitle::ID: {
|
||||||
@ -4333,6 +4337,13 @@ void Client::on_update(object_ptr<td_api::Object> result) {
|
|||||||
chat_info->message_auto_delete_time = update->message_ttl_setting_;
|
chat_info->message_auto_delete_time = update->message_ttl_setting_;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case td_api::updateChatHasProtectedContent::ID: {
|
||||||
|
auto update = move_object_as<td_api::updateChatHasProtectedContent>(result);
|
||||||
|
auto chat_info = add_chat(update->chat_id_);
|
||||||
|
CHECK(chat_info->type != ChatInfo::Type::Unknown);
|
||||||
|
chat_info->has_protected_content = update->has_protected_content_;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case td_api::updateUser::ID: {
|
case td_api::updateUser::ID: {
|
||||||
auto update = move_object_as<td_api::updateUser>(result);
|
auto update = move_object_as<td_api::updateUser>(result);
|
||||||
add_user(users_, std::move(update->user_));
|
add_user(users_, std::move(update->user_));
|
||||||
|
@ -629,6 +629,7 @@ class Client : public WebhookActor::Callback {
|
|||||||
Type type = Type::Unknown;
|
Type type = Type::Unknown;
|
||||||
td::string title;
|
td::string title;
|
||||||
int32 message_auto_delete_time = 0;
|
int32 message_auto_delete_time = 0;
|
||||||
|
bool has_protected_content = false;
|
||||||
object_ptr<td_api::chatPhotoInfo> photo;
|
object_ptr<td_api::chatPhotoInfo> photo;
|
||||||
object_ptr<td_api::chatPermissions> permissions;
|
object_ptr<td_api::chatPermissions> permissions;
|
||||||
union {
|
union {
|
||||||
|
Loading…
Reference in New Issue
Block a user