2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Show "Topic Author" fake admin rank.

This commit is contained in:
John Preston
2022-10-28 12:54:06 +04:00
parent aa5f9467f2
commit af6ca8d4f1
17 changed files with 59 additions and 5 deletions

View File

@@ -149,6 +149,7 @@ ForumTopic::ForumTopic(not_null<Forum*> forum, MsgId rootId)
rootId))
, _rootId(rootId)
, _lastKnownServerMessageId(rootId)
, _creatorId(creating() ? forum->session().userPeerId() : 0)
, _creationDate(creating() ? base::unixtime::now() : 0)
, _flags(creating() ? Flag::My : Flag()) {
Thread::setMuted(owner().notifySettings().isMuted(this));
@@ -203,6 +204,10 @@ MsgId ForumTopic::rootId() const {
return _rootId;
}
PeerId ForumTopic::creatorId() const {
return _creatorId;
}
TimeId ForumTopic::creationDate() const {
return _creationDate;
}
@@ -267,6 +272,7 @@ void ForumTopic::readTillEnd() {
void ForumTopic::applyTopic(const MTPDforumTopic &data) {
Expects(_rootId == data.vid().v);
_creatorId = peerFromMTP(data.vfrom_id());
_creationDate = data.vdate().v;
applyTitle(qs(data.vtitle()));