mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-11-27 06:06:47 +01:00
Add Chat.has_restricted_voice_and_video_messages.
This commit is contained in:
parent
e66c5fa67d
commit
9f3f32391c
@ -665,6 +665,9 @@ class Client::JsonChat final : public Jsonable {
|
||||
if (user_info->has_private_forwards) {
|
||||
object("has_private_forwards", td::JsonTrue());
|
||||
}
|
||||
if (user_info->has_restricted_voice_and_video_messages) {
|
||||
object("has_restricted_voice_and_video_messages", td::JsonTrue());
|
||||
}
|
||||
}
|
||||
photo = user_info->photo.get();
|
||||
break;
|
||||
@ -4728,6 +4731,8 @@ void Client::on_update(object_ptr<td_api::Object> result) {
|
||||
set_user_bio(user_id, std::move(full_info->bio_->text_));
|
||||
}
|
||||
set_user_has_private_forwards(user_id, full_info->has_private_forwards_);
|
||||
set_user_has_restricted_voice_and_video_messages(user_id,
|
||||
full_info->has_restricted_voice_and_video_note_messages_);
|
||||
break;
|
||||
}
|
||||
case td_api::updateBasicGroup::ID: {
|
||||
@ -9119,6 +9124,11 @@ void Client::set_user_has_private_forwards(int64 user_id, bool has_private_forwa
|
||||
add_user_info(user_id)->has_private_forwards = has_private_forwards;
|
||||
}
|
||||
|
||||
void Client::set_user_has_restricted_voice_and_video_messages(int64 user_id,
|
||||
bool has_restricted_voice_and_video_messages) {
|
||||
add_user_info(user_id)->has_restricted_voice_and_video_messages = has_restricted_voice_and_video_messages;
|
||||
}
|
||||
|
||||
void Client::add_group(GroupInfo *group_info, object_ptr<td_api::basicGroup> &&group) {
|
||||
group_info->member_count = group->member_count_;
|
||||
group_info->left = group->status_->get_id() == td_api::chatMemberStatusLeft::ID;
|
||||
|
@ -634,6 +634,7 @@ class Client final : public WebhookActor::Callback {
|
||||
bool can_read_all_group_messages = false;
|
||||
bool is_inline_bot = false;
|
||||
bool has_private_forwards = false;
|
||||
bool has_restricted_voice_and_video_messages = false;
|
||||
bool is_premium = false;
|
||||
bool added_to_attachment_menu = false;
|
||||
};
|
||||
@ -641,6 +642,7 @@ class Client final : public WebhookActor::Callback {
|
||||
void set_user_photo(int64 user_id, object_ptr<td_api::chatPhoto> &&photo);
|
||||
void set_user_bio(int64 user_id, td::string &&bio);
|
||||
void set_user_has_private_forwards(int64 user_id, bool has_private_forwards);
|
||||
void set_user_has_restricted_voice_and_video_messages(int64 user_id, bool has_restricted_voice_and_video_messages);
|
||||
UserInfo *add_user_info(int64 user_id);
|
||||
const UserInfo *get_user_info(int64 user_id) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user