From c3b6b48fa2b4e8defc4faa66a16298fe1a2a0ba2 Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Tue, 15 Feb 2022 10:21:38 +0000 Subject: [PATCH] click_handlers: Only select messages on click by a spectator. When a message clicked, don't show login modal or open compose for a spectator. --- static/js/click_handlers.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/js/click_handlers.js b/static/js/click_handlers.js index 36c2fd3e9b..801dc9490e 100644 --- a/static/js/click_handlers.js +++ b/static/js/click_handlers.js @@ -28,6 +28,7 @@ import * as muted_topics_ui from "./muted_topics_ui"; import * as narrow from "./narrow"; import * as notifications from "./notifications"; import * as overlays from "./overlays"; +import {page_params} from "./page_params"; import * as popovers from "./popovers"; import * as reactions from "./reactions"; import * as recent_topics_ui from "./recent_topics_ui"; @@ -173,6 +174,10 @@ export function initialize() { } message_lists.current.select_id(id); + + if (page_params.is_spectator) { + return; + } compose_actions.respond_to_message({trigger: "message click"}); e.stopPropagation(); popovers.hide_all();