mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
megagroups started
This commit is contained in:
@@ -211,6 +211,7 @@ public:
|
||||
return (input.type() == mtpc_inputPeerSelf);
|
||||
}
|
||||
bool isVerified() const;
|
||||
bool isMegagroup() const;
|
||||
UserData *asUser();
|
||||
const UserData *asUser() const;
|
||||
ChatData *asChat();
|
||||
@@ -515,6 +516,9 @@ public:
|
||||
int32 date;
|
||||
int32 version;
|
||||
int32 flags, flagsFull;
|
||||
bool isMegagroup() const {
|
||||
return flags & MTPDchannel::flag_megagroup;
|
||||
}
|
||||
bool isBroadcast() const {
|
||||
return flags & MTPDchannel::flag_broadcast;
|
||||
}
|
||||
@@ -626,6 +630,9 @@ inline const QString &PeerData::userName() const {
|
||||
inline bool PeerData::isVerified() const {
|
||||
return isUser() ? asUser()->isVerified() : (isChannel() ? asChannel()->isVerified() : false);
|
||||
}
|
||||
inline bool PeerData::isMegagroup() const {
|
||||
return isChannel() ? asChannel()->isMegagroup() : false;
|
||||
}
|
||||
|
||||
inline int32 newMessageFlags(PeerData *p) {
|
||||
return p->isSelf() ? 0 : (((p->isChat() || (p->isUser() && !p->asUser()->botInfo)) ? MTPDmessage::flag_unread : 0) | MTPDmessage::flag_out);
|
||||
|
Reference in New Issue
Block a user