mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
We've been seeing an exception in server_event_dispatch.js in production where in large organizations, sometimes when a new user joined, every other browser in the organization would throw an exception processing some sort of realm_user/update event. It turns out the cause was that when a user copies their profile from an existing user account with a user-uploaded avatar, the code path we reused to set the avatar properly send a realm_user/update event about the avatar change -- for a user that hadn't been fully created and certainly hadn't have the realm_user/add event sent for. We fix this and add tests and comments to prevent it recurring. (Removed an incorrect docstring while working on this).
7.2 KiB
7.2 KiB