2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Added usernames info to ChannelData.

This commit is contained in:
23rd
2022-10-12 18:06:21 +03:00
committed by John Preston
parent ffa8a94180
commit 4f4d0bef25
4 changed files with 37 additions and 6 deletions

View File

@@ -13,6 +13,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_chat_participant_status.h"
#include "data/data_peer_bot_commands.h"
namespace Data {
struct Username;
} // namespace Data
struct ChannelLocation {
QString address;
Data::LocationPoint point;
@@ -147,6 +151,7 @@ public:
void setName(const QString &name, const QString &username);
void setUsername(const QString &username);
void setUsernames(const std::vector<Data::Username> &usernames);
void setPhoto(const MTPChatPhoto &photo);
void setAccessHash(uint64 accessHash);
@@ -161,6 +166,7 @@ public:
}
[[nodiscard]] QString username() const;
[[nodiscard]] const std::vector<QString> &usernames() const;
[[nodiscard]] int membersCount() const {
return std::max(_membersCount, 1);
@@ -461,6 +467,7 @@ private:
PtsWaiter _ptsWaiter;
QString _username;
std::vector<QString> _usernames;
int _membersCount = -1;
int _adminsCount = 1;