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

Filter out allowed gift types.

This commit is contained in:
John Preston
2025-03-17 13:27:24 +04:00
parent b656e14453
commit c0fed4d2c3
5 changed files with 141 additions and 40 deletions

View File

@@ -15,12 +15,18 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_lastseen_status.h"
#include "data/data_user_names.h"
#include "dialogs/dialogs_key.h"
#include "base/flags.h"
namespace Data {
struct BotCommand;
struct BusinessDetails;
} // namespace Data
namespace Api {
enum class DisallowedGiftType;
using DisallowedGiftTypes = base::flags<DisallowedGiftType>;
} // namespace Api
struct StarRefProgram {
StarsAmount revenuePerUser;
TimeId endDate = 0;
@@ -262,6 +268,11 @@ public:
std::unique_ptr<BotInfo> botInfo;
[[nodiscard]] Api::DisallowedGiftTypes disallowedGiftTypes() const {
return _disallowedGiftTypes;
}
void setDisallowedGiftTypes(Api::DisallowedGiftTypes types);
private:
auto unavailableReasons() const
-> const std::vector<Data::UnavailableReason> & override;
@@ -293,6 +304,8 @@ private:
static constexpr auto kInaccessibleAccessHashOld
= 0xFFFFFFFFFFFFFFFFULL;
Api::DisallowedGiftTypes _disallowedGiftTypes;
};
namespace Data {