mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
people: Extract helper functions for medium avatar urls.
The new is obviously parallel with the small avatar URL construction, and allows us to deduplicate this construction between the popovers and full user profile logic for getting a medium avatar URL. Fixes #20140.
This commit is contained in:
@@ -158,8 +158,7 @@ function init_email_tooltip(user) {
|
||||
}
|
||||
|
||||
function load_medium_avatar(user, elt) {
|
||||
const avatar_path = "avatar/" + user.user_id + "/medium?v=" + user.avatar_version;
|
||||
const user_avatar_url = new URL(avatar_path, window.location.href);
|
||||
const user_avatar_url = people.medium_avatar_url_for_person(user);
|
||||
const sender_avatar_medium = new Image();
|
||||
|
||||
sender_avatar_medium.src = user_avatar_url;
|
||||
|
||||
Reference in New Issue
Block a user