people: Fix small avatar URL generation.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-10-13 15:48:32 -07:00
committed by Tim Abbott
parent afa47b9ae3
commit cab0f9c219
4 changed files with 13 additions and 9 deletions

View File

@@ -619,8 +619,9 @@ export function exclude_me_from_string(user_ids_string) {
}
export function format_small_avatar_url(raw_url) {
const url = raw_url + "&s=50";
return url;
const url = new URL(raw_url, location);
url.search += (url.search ? "&" : "") + "s=50";
return url.href;
}
export function sender_is_bot(message) {