Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
user_profile: Move event registration to the correct place.
Daniil Fadeev257c327f39af
diff --git a/web/src/popovers.js b/web/src/popovers.jsindex 76eefeb1c51..ec14ba98fa7 100644--- a/web/src/popovers.js+++ b/web/src/popovers.js@@ -960,6 +960,14 @@ export function register_click_handlers() {const user = people.get_by_user_id(user_id);show_user_info_popover_manage_menu(e.target, user);});++ $("body").on("click", ".info_popover_actions .view_full_user_profile", (e) => {+ const user_id = elem_to_user_id($(e.target).parents("ul"));+ const user = people.get_by_user_id(user_id);+ user_profile.show_user_profile(user);+ e.stopPropagation();+ e.preventDefault();+ });}export function any_active() {diff --git a/web/src/user_profile.js b/web/src/user_profile.jsindex 8c6ec68c62d..6f34eef3455 100644--- a/web/src/user_profile.js+++ b/web/src/user_profile.js@@ -422,14 +422,6 @@ function handle_remove_stream_subscription(target_user_id, sub, success, failure}export function register_click_handlers() {- $("body").on("click", ".info_popover_actions .view_full_user_profile", (e) => {- const user_id = popovers.elem_to_user_id($(e.target).parents("ul"));- const user = people.get_by_user_id(user_id);- show_user_profile(user);- e.stopPropagation();- e.preventDefault();- });-$("body").on("click", "#user-profile-modal .add-subscription-button", (e) => {e.preventDefault();const stream_id = Number.parseInt(user_profile_subscribe_widget.value(), 10);