2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Allow boosts / giveaways in groups.

This commit is contained in:
John Preston
2024-02-02 21:30:53 +04:00
parent cb174cb0bf
commit f6a8c1e996
16 changed files with 302 additions and 148 deletions

View File

@@ -604,7 +604,7 @@ rpl::producer<rpl::no_value, QString> Boosts::request() {
return [=](auto consumer) {
auto lifetime = rpl::lifetime();
const auto channel = _peer->asChannel();
if (!channel || channel->isMegagroup()) {
if (!channel) {
return lifetime;
}
@@ -628,6 +628,7 @@ rpl::producer<rpl::no_value, QString> Boosts::request() {
const auto slots = data.vmy_boost_slots();
_boostStatus.overview = Data::BoostsOverview{
.group = channel->isMegagroup(),
.mine = slots ? int(slots->v.size()) : 0,
.level = std::max(data.vlevel().v, 0),
.boostCount = std::max(