Generalize the "joined community" service message.

This commit is contained in:
John Preston
2026-06-19 11:11:42 +04:00
parent 2016cf5211
commit 5ecffe5c5c
13 changed files with 242 additions and 225 deletions
@@ -117,6 +117,10 @@ HistoryUnreadThings::ConstProxy Thread::unreadPollVotes() const {
bool Thread::canToggleUnread(bool nowUnread) const {
if ((asTopic() || asForum()) && !nowUnread) {
return false;
} else if (const auto channel = asHistory() ? peer()->asChannel() : nullptr
; channel && channel->isCommunity() && !nowUnread) {
// Communities support "mark as read" but not "mark as unread".
return false;
} else if (asSublist() && owningHistory()->peer->isSelf()) {
return false;
} else if (asHistory() && peer()->amMonoforumAdmin()) {