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.

people: Fix profile data undefined for user when processing user event.

Aman Agrawal810827599f05
diff --git a/web/src/people.ts b/web/src/people.ts
index a995b3ecd9c..b7c18f425a8 100644
--- a/web/src/people.ts
+++ b/web/src/people.ts
@@ -1972,6 +1972,9 @@ export async function fetch_users(user_ids: Set<number>): Promise<UsersFetchResp
}
return new Promise((resolve, reject) => {
fetch_users_from_server({
+ // POST /register obtains custom profile field data if and only if
+ // the current user is not a spectator. Mimic this behavior.
+ include_custom_profile_fields: !page_params.is_spectator,
user_ids: JSON.stringify([...user_ids_to_fetch]),
success(users) {
resolve(users);