mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2025-01-26 03:37:32 +01:00
Add field Chat.has_private_forwards.
This commit is contained in:
parent
9f8606b612
commit
052032ee8b
@ -634,6 +634,9 @@ class Client::JsonChat : public Jsonable {
|
|||||||
if (!user_info->bio.empty()) {
|
if (!user_info->bio.empty()) {
|
||||||
object("bio", user_info->bio);
|
object("bio", user_info->bio);
|
||||||
}
|
}
|
||||||
|
if (user_info->has_private_forwards) {
|
||||||
|
object("has_private_forwards", td::JsonTrue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4353,6 +4356,7 @@ void Client::on_update(object_ptr<td_api::Object> result) {
|
|||||||
auto update = move_object_as<td_api::updateUserFullInfo>(result);
|
auto update = move_object_as<td_api::updateUserFullInfo>(result);
|
||||||
auto user_id = update->user_id_;
|
auto user_id = update->user_id_;
|
||||||
set_user_bio(user_id, std::move(update->user_full_info_->bio_));
|
set_user_bio(user_id, std::move(update->user_full_info_->bio_));
|
||||||
|
set_user_has_private_forwards(user_id, update->user_full_info_->has_private_forwards_);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case td_api::updateBasicGroup::ID: {
|
case td_api::updateBasicGroup::ID: {
|
||||||
@ -8369,6 +8373,11 @@ void Client::set_user_bio(int64 user_id, td::string &&bio) {
|
|||||||
user_info->bio = std::move(bio);
|
user_info->bio = std::move(bio);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Client::set_user_has_private_forwards(int64 user_id, bool has_private_forwards) {
|
||||||
|
auto user_info = &users_[user_id];
|
||||||
|
user_info->has_private_forwards = has_private_forwards;
|
||||||
|
}
|
||||||
|
|
||||||
void Client::add_group(std::unordered_map<int64, GroupInfo> &groups, object_ptr<td_api::basicGroup> &&group) {
|
void Client::add_group(std::unordered_map<int64, GroupInfo> &groups, object_ptr<td_api::basicGroup> &&group) {
|
||||||
auto group_info = &groups[group->id_];
|
auto group_info = &groups[group->id_];
|
||||||
group_info->member_count = group->member_count_;
|
group_info->member_count = group->member_count_;
|
||||||
|
@ -580,9 +580,11 @@ class Client : public WebhookActor::Callback {
|
|||||||
bool can_join_groups = false;
|
bool can_join_groups = false;
|
||||||
bool can_read_all_group_messages = false;
|
bool can_read_all_group_messages = false;
|
||||||
bool is_inline_bot = false;
|
bool is_inline_bot = false;
|
||||||
|
bool has_private_forwards = false;
|
||||||
};
|
};
|
||||||
static void add_user(std::unordered_map<int64, UserInfo> &users, object_ptr<td_api::user> &&user);
|
static void add_user(std::unordered_map<int64, UserInfo> &users, object_ptr<td_api::user> &&user);
|
||||||
void set_user_bio(int64 user_id, td::string &&bio);
|
void set_user_bio(int64 user_id, td::string &&bio);
|
||||||
|
void set_user_has_private_forwards(int64 user_id, bool has_private_forwards);
|
||||||
const UserInfo *get_user_info(int64 user_id) const;
|
const UserInfo *get_user_info(int64 user_id) const;
|
||||||
|
|
||||||
struct GroupInfo {
|
struct GroupInfo {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user