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

Allow saving boosts to lift restrictions.

This commit is contained in:
John Preston
2024-02-06 14:54:15 +04:00
parent f6a8c1e996
commit 180b14ea36
7 changed files with 317 additions and 23 deletions

View File

@@ -133,6 +133,10 @@ public:
mutable int lastParticipantsStatus = LastParticipantsUpToDate;
int lastParticipantsCount = 0;
int boostsApplied = 0;
int boostsUnrestrict = 0;
int slowmodeSeconds = 0;
TimeId slowmodeLastMessage = 0;
private:
ChatData *_migratedFrom = nullptr;
@@ -433,6 +437,11 @@ public:
[[nodiscard]] TimeId slowmodeLastMessage() const;
void growSlowmodeLastMessage(TimeId when);
[[nodiscard]] int boostsApplied() const;
[[nodiscard]] int boostsUnrestrict() const;
[[nodiscard]] bool unrestrictedByBoosts() const;
void setBoostsUnrestrict(int applied, int unrestrict);
void setInvitePeek(const QString &hash, TimeId expires);
void clearInvitePeek();
[[nodiscard]] TimeId invitePeekExpires() const;
@@ -520,9 +529,6 @@ private:
std::unique_ptr<Data::GroupCall> _call;
PeerId _callDefaultJoinAs = 0;
int _slowmodeSeconds = 0;
TimeId _slowmodeLastMessage = 0;
};
namespace Data {