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:
somesh202
2021-11-06 11:53:26 +05:30
committed by Tim Abbott
parent e9d80390cc
commit 219ecea659
5 changed files with 29 additions and 6 deletions

View File

@@ -154,7 +154,7 @@ export function show_user_profile(user) {
full_name: user.full_name,
email: people.get_visible_email(user),
profile_data,
user_avatar: "avatar/" + user.user_id + "/medium",
user_avatar: people.medium_avatar_url_for_person(user),
is_me: people.is_current_user(user.email),
date_joined: dateFormat.format(parseISO(user.date_joined)),
last_seen: buddy_data.user_last_seen_time_status(user.user_id),