Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

user_card_popover: Fix bug where owner's avatar replaces bot's avatar.

Sayam Samal9b314da0ea3a
diff --git a/web/src/user_card_popover.js b/web/src/user_card_popover.js
index 45dfc560aac..2d8839f96c0 100644
--- a/web/src/user_card_popover.js
+++ b/web/src/user_card_popover.js
@@ -334,6 +334,7 @@ function show_user_card_popover(
if (on_mount) {
on_mount(instance);
}
+ const $popover = $(instance.popper);
// Note: We pass the normal-size avatar in initial rendering, and
// then query the server to replace it with the medium-size
// avatar. The purpose of this double-fetch approach is to take
@@ -341,7 +342,7 @@ function show_user_card_popover(
// low-resolution image cached and thus display a low-resolution
// avatar rather than a blank area during the network delay for
// fetching the medium-size one.
- load_medium_avatar(user, $(".popover-menu-user-avatar"));
+ load_medium_avatar(user, $popover.find(".popover-menu-user-avatar"));
init_email_clipboard();
init_email_tooltip(user);
},