2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Track stars-per-message for users and channels.

This commit is contained in:
John Preston
2025-02-13 14:12:19 +04:00
parent f2aa3afbbb
commit 45c7829cd8
10 changed files with 239 additions and 102 deletions

View File

@@ -145,6 +145,8 @@ public:
int slowmodeSeconds = 0;
TimeId slowmodeLastMessage = 0;
int starsPerMessage = 0;
private:
ChatData *_migratedFrom = nullptr;
ChannelLocation _location;
@@ -456,6 +458,9 @@ public:
[[nodiscard]] TimeId slowmodeLastMessage() const;
void growSlowmodeLastMessage(TimeId when);
[[nodiscard]] int starsPerMessage() const;
void setStarsPerMessage(int stars);
[[nodiscard]] int peerGiftsCount() const;
void setPeerGiftsCount(int count);