mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-09-01 20:16:01 +02:00
Add join_to_send_messages and join_by_request flags to Chat.
This commit is contained in:
parent
06d40edb0a
commit
0ac93c8674
@ -712,6 +712,12 @@ class Client::JsonChat final : public Jsonable {
|
||||
if (supergroup_info->is_supergroup) {
|
||||
object("permissions", JsonChatPermissions(chat_info->permissions.get()));
|
||||
}
|
||||
if (supergroup_info->is_supergroup && supergroup_info->join_to_send_messages) {
|
||||
object("join_to_send_messages", td::JsonTrue());
|
||||
}
|
||||
if (supergroup_info->is_supergroup && supergroup_info->join_by_request) {
|
||||
object("join_by_request", td::JsonTrue());
|
||||
}
|
||||
if (supergroup_info->slow_mode_delay != 0) {
|
||||
object("slow_mode_delay", supergroup_info->slow_mode_delay);
|
||||
}
|
||||
@ -8998,6 +9004,8 @@ void Client::add_supergroup(SupergroupInfo *supergroup_info, object_ptr<td_api::
|
||||
supergroup_info->status = std::move(supergroup->status_);
|
||||
supergroup_info->is_supergroup = !supergroup->is_channel_;
|
||||
supergroup_info->has_location = supergroup->has_location_;
|
||||
supergroup_info->join_to_send_messages = supergroup->join_to_send_messages_;
|
||||
supergroup_info->join_by_request = supergroup->join_by_request_;
|
||||
}
|
||||
|
||||
void Client::set_supergroup_photo(int64 supergroup_id, object_ptr<td_api::chatPhoto> &&photo) {
|
||||
|
@ -655,6 +655,8 @@ class Client final : public WebhookActor::Callback {
|
||||
bool is_supergroup = false;
|
||||
bool can_set_sticker_set = false;
|
||||
bool has_location = false;
|
||||
bool join_to_send_messages = false;
|
||||
bool join_by_request = 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);
|
||||
|
Loading…
Reference in New Issue
Block a user