mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2025-01-01 07:05:49 +01:00
Add Chat.has_hidden_members.
This commit is contained in:
parent
849d48e858
commit
b972cebad4
@ -790,6 +790,9 @@ class Client::JsonChat final : public Jsonable {
|
||||
if (supergroup_info->is_supergroup && supergroup_info->join_by_request) {
|
||||
object("join_by_request", td::JsonTrue());
|
||||
}
|
||||
if (supergroup_info->is_supergroup && supergroup_info->has_hidden_members) {
|
||||
object("has_hidden_members", td::JsonTrue());
|
||||
}
|
||||
if (supergroup_info->slow_mode_delay != 0) {
|
||||
object("slow_mode_delay", supergroup_info->slow_mode_delay);
|
||||
}
|
||||
@ -5056,6 +5059,7 @@ void Client::on_update(object_ptr<td_api::Object> result) {
|
||||
set_supergroup_slow_mode_delay(supergroup_id, full_info->slow_mode_delay_);
|
||||
set_supergroup_linked_chat_id(supergroup_id, full_info->linked_chat_id_);
|
||||
set_supergroup_location(supergroup_id, std::move(full_info->location_));
|
||||
set_supergroup_has_hidden_members(supergroup_id, full_info->has_hidden_members_);
|
||||
break;
|
||||
}
|
||||
case td_api::updateOption::ID: {
|
||||
@ -9781,6 +9785,10 @@ void Client::set_supergroup_location(int64 supergroup_id, object_ptr<td_api::cha
|
||||
add_supergroup_info(supergroup_id)->location = std::move(location);
|
||||
}
|
||||
|
||||
void Client::set_supergroup_has_hidden_members(int64 supergroup_id, bool has_hidden_members) {
|
||||
add_supergroup_info(supergroup_id)->has_hidden_members = has_hidden_members;
|
||||
}
|
||||
|
||||
Client::SupergroupInfo *Client::add_supergroup_info(int64 supergroup_id) {
|
||||
auto &supergroup_info = supergroups_[supergroup_id];
|
||||
if (supergroup_info == nullptr) {
|
||||
|
@ -711,6 +711,7 @@ class Client final : public WebhookActor::Callback {
|
||||
bool has_location = false;
|
||||
bool join_to_send_messages = false;
|
||||
bool join_by_request = false;
|
||||
bool has_hidden_members = false;
|
||||
};
|
||||
static void add_supergroup(SupergroupInfo *supergroup_info, object_ptr<td_api::supergroup> &&supergroup);
|
||||
void set_supergroup_photo(int64 supergroup_id, object_ptr<td_api::chatPhoto> &&photo);
|
||||
@ -721,6 +722,7 @@ class Client final : public WebhookActor::Callback {
|
||||
void set_supergroup_slow_mode_delay(int64 supergroup_id, int32 slow_mode_delay);
|
||||
void set_supergroup_linked_chat_id(int64 supergroup_id, int64 linked_chat_id);
|
||||
void set_supergroup_location(int64 supergroup_id, object_ptr<td_api::chatLocation> location);
|
||||
void set_supergroup_has_hidden_members(int64 supergroup_id, bool has_hidden_members);
|
||||
SupergroupInfo *add_supergroup_info(int64 supergroup_id);
|
||||
const SupergroupInfo *get_supergroup_info(int64 supergroup_id) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user