From d0e8802b9dfb1fc34227d960636a4ddf6e0f1121 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 11 Apr 2023 20:54:56 +0400 Subject: [PATCH] Allow who viewed lists in topic groups. --- Telegram/SourceFiles/api/api_who_reacted.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/api/api_who_reacted.cpp b/Telegram/SourceFiles/api/api_who_reacted.cpp index 86e0a5881a..6fc8800b9d 100644 --- a/Telegram/SourceFiles/api/api_who_reacted.cpp +++ b/Telegram/SourceFiles/api/api_who_reacted.cpp @@ -619,8 +619,11 @@ bool WhoReadExists(not_null item) { return false; } const auto type = DetectSeenType(item); + const auto thread = item->topic() + ? (Data::Thread*)item->topic() + : item->history(); const auto unseen = (type == Ui::WhoReadType::Seen) - ? item->unread(item->history()) + ? item->unread(thread) : item->isUnreadMedia(); if (unseen) { return false; @@ -630,7 +633,6 @@ bool WhoReadExists(not_null item) { const auto chat = peer->asChat(); const auto megagroup = peer->asMegagroup(); if ((!chat && !megagroup) - || peer->isForum() || (megagroup && (megagroup->flags() & ChannelDataFlag::ParticipantsHidden))) { return false;