From 23cd8b8564ae93ec6a584fd9a012090aba364a2e Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Wed, 4 Dec 2024 20:49:30 +0530 Subject: [PATCH] message_list_data: Use common logic for filtering msgs `in-home`. --- web/src/message_list_data.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/src/message_list_data.ts b/web/src/message_list_data.ts index fa80d6c203..35982525e1 100644 --- a/web/src/message_list_data.ts +++ b/web/src/message_list_data.ts @@ -221,6 +221,12 @@ export class MessageListData { if (message.type !== "stream") { return true; } + + // TODO: Widen this if check to include other narrows as well. + if (this.filter.is_in_home()) { + return user_topics.is_topic_visible_in_home(message.stream_id, message.topic); + } + return ( !user_topics.is_topic_muted(message.stream_id, message.topic) || message.mentioned );