mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2025-01-28 12:17:32 +01:00
Add ChatFullInfo.can_send_paid_media for channels.
This commit is contained in:
parent
546777ab24
commit
3e1fee6d7a
@ -1091,6 +1091,9 @@ class Client::JsonChat final : public td::Jsonable {
|
|||||||
if (supergroup_info->location != nullptr) {
|
if (supergroup_info->location != nullptr) {
|
||||||
object("location", JsonChatLocation(supergroup_info->location.get()));
|
object("location", JsonChatLocation(supergroup_info->location.get()));
|
||||||
}
|
}
|
||||||
|
if (supergroup_info->has_paid_media_allowed && !supergroup_info->is_supergroup) {
|
||||||
|
object("can_send_paid_media", td::JsonTrue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
photo = supergroup_info->photo.get();
|
photo = supergroup_info->photo.get();
|
||||||
break;
|
break;
|
||||||
@ -6952,6 +6955,7 @@ void Client::on_update(object_ptr<td_api::Object> result) {
|
|||||||
supergroup_info->location = std::move(full_info->location_);
|
supergroup_info->location = std::move(full_info->location_);
|
||||||
supergroup_info->has_hidden_members = full_info->has_hidden_members_;
|
supergroup_info->has_hidden_members = full_info->has_hidden_members_;
|
||||||
supergroup_info->has_aggressive_anti_spam_enabled = full_info->has_aggressive_anti_spam_enabled_;
|
supergroup_info->has_aggressive_anti_spam_enabled = full_info->has_aggressive_anti_spam_enabled_;
|
||||||
|
supergroup_info->has_paid_media_allowed = full_info->has_paid_media_allowed_;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case td_api::updateOption::ID: {
|
case td_api::updateOption::ID: {
|
||||||
|
@ -878,6 +878,7 @@ class Client final : public WebhookActor::Callback {
|
|||||||
bool join_by_request = false;
|
bool join_by_request = false;
|
||||||
bool has_hidden_members = false;
|
bool has_hidden_members = false;
|
||||||
bool has_aggressive_anti_spam_enabled = false;
|
bool has_aggressive_anti_spam_enabled = false;
|
||||||
|
bool has_paid_media_allowed = false;
|
||||||
};
|
};
|
||||||
static void add_supergroup(SupergroupInfo *supergroup_info, object_ptr<td_api::supergroup> &&supergroup);
|
static void add_supergroup(SupergroupInfo *supergroup_info, object_ptr<td_api::supergroup> &&supergroup);
|
||||||
SupergroupInfo *add_supergroup_info(int64 supergroup_id);
|
SupergroupInfo *add_supergroup_info(int64 supergroup_id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user