From c8d038a239ba21380f29ee607a3f76d97a3be646 Mon Sep 17 00:00:00 2001 From: Shubham Dhama Date: Sat, 3 Feb 2018 18:03:22 +0530 Subject: [PATCH] popovers: Fix user-mention popover errors of `@all` mention. `@all` and `@everyone` mentions don't have specific popover, so constraint added to prevent console errors. --- static/js/popovers.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static/js/popovers.js b/static/js/popovers.js index ceefc64df7..d4e45ec75f 100644 --- a/static/js/popovers.js +++ b/static/js/popovers.js @@ -438,10 +438,13 @@ exports.register_click_handlers = function () { }); $("#main_div").on("click", ".user-mention", function (e) { + var id = $(this).attr('data-user-id'); + if (id === '*') { + return; + } var row = $(this).closest(".message_row"); e.stopPropagation(); var message = current_msg_list.get(rows.id(row)); - var id = $(this).attr('data-user-id'); var user = people.get_person_from_user_id(id); show_user_info_popover(this, user, message); });