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

Allow sending paid messages.

This commit is contained in:
John Preston
2025-02-13 19:03:11 +04:00
parent 45c7829cd8
commit bbc14ba74f
25 changed files with 497 additions and 143 deletions

View File

@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#pragma once
#include "core/stars_amount.h"
#include "data/components/credits.h"
#include "data/data_birthday.h"
#include "data/data_peer.h"
#include "data/data_chat_participant_status.h"
@@ -179,8 +180,12 @@ public:
[[nodiscard]] bool canSendIgnoreRequirePremium() const;
[[nodiscard]] bool readDatesPrivate() const;
[[nodiscard]] int starsPerMessage() const;
void setStarsPerMessage(int stars);
[[nodiscard]] int starsPerMessage() const;
[[nodiscard]] int starsForMessageLocked() const;
void lockStarsForMessage();
[[nodiscard]] int commitStarsForMessage();
void cancelStarsForMessage();
[[nodiscard]] bool canShareThisContact() const;
[[nodiscard]] bool canAddContact() const;
@@ -272,6 +277,7 @@ private:
int _commonChatsCount = 0;
int _peerGiftsCount = 0;
int _starsPerMessage = 0;
int _starsForMessageLocked = 0;
ContactStatus _contactStatus = ContactStatus::Unknown;
CallsStatus _callsStatus = CallsStatus::Unknown;