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

Support business working hours API.

This commit is contained in:
John Preston
2024-02-22 22:00:11 +04:00
parent 4d12f1c0ef
commit dd0bdd62fb
9 changed files with 177 additions and 65 deletions

View File

@@ -15,6 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace Data {
struct BotCommand;
struct BusinessDetails;
} // namespace Data
struct BotInfo {
@@ -84,6 +85,8 @@ public:
using Flags = Data::Flags<UserDataFlags>;
UserData(not_null<Data::Session*> owner, PeerId id);
~UserData();
void setPhoto(const MTPUserProfilePhoto &photo);
void setName(
@@ -192,6 +195,9 @@ public:
[[nodiscard]] bool hasUnreadStories() const;
void setStoriesState(StoriesState state);
[[nodiscard]] const Data::BusinessDetails &businessDetails() const;
void setBusinessDetails(Data::BusinessDetails details);
private:
auto unavailableReasons() const
-> const std::vector<Data::UnavailableReason> & override;
@@ -201,6 +207,7 @@ private:
Data::UsernamesInfo _username;
std::unique_ptr<Data::BusinessDetails> _businessDetails;
std::vector<Data::UnavailableReason> _unavailableReasons;
QString _phone;
QString _privateForwardName;