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.

portico: Load medium-sized avatar in preview.

Jenna Jaehnig0f59e2e78834
diff --git a/zerver/lib/users.py b/zerver/lib/users.py
index 98b3986064a..9c1cf25f836 100644
--- a/zerver/lib/users.py
+++ b/zerver/lib/users.py
@@ -487,12 +487,13 @@ def get_accounts_for_email(email: str) -> list[Account]:
)
.order_by("date_joined")
)
+
return [
dict(
realm_name=profile.realm.name,
realm_id=profile.realm.id,
full_name=profile.full_name,
- avatar=avatar_url(profile),
+ avatar=avatar_url(profile, medium=True),
)
for profile in profiles
]
diff --git a/zerver/tests/test_users.py b/zerver/tests/test_users.py
index 4f59ecda965..79f15e6904b 100644
--- a/zerver/tests/test_users.py
+++ b/zerver/tests/test_users.py
@@ -1471,7 +1471,7 @@ class UserProfileTest(ZulipTestCase):
for account in accounts:
realm = user.realm
if (
- account["avatar"] == avatar_url(user)
+ account["avatar"] == avatar_url(user, medium=True)
and account["full_name"] == user.full_name
and account["realm_name"] == realm.name
and account["realm_id"] == realm.id