2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Respect boosts restrictions lifting.

This commit is contained in:
John Preston
2024-02-06 17:32:25 +04:00
parent 180b14ea36
commit ea12c2f62c
6 changed files with 35 additions and 11 deletions

View File

@@ -114,6 +114,7 @@ public:
base::flat_map<not_null<UserData*>, Restricted> lastRestricted;
base::flat_set<not_null<PeerData*>> markupSenders;
base::flat_set<not_null<UserData*>> bots;
rpl::event_stream<bool> unrestrictedByBoostsChanges;
// For admin badges, full admins list with ranks.
base::flat_map<UserId, QString> admins;
@@ -440,6 +441,7 @@ public:
[[nodiscard]] int boostsApplied() const;
[[nodiscard]] int boostsUnrestrict() const;
[[nodiscard]] bool unrestrictedByBoosts() const;
[[nodiscard]] rpl::producer<bool> unrestrictedByBoostsValue() const;
void setBoostsUnrestrict(int applied, int unrestrict);
void setInvitePeek(const QString &hash, TimeId expires);