Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hidden email: Record our own
email
as returned by /register
.
With the "hidden emails" feature (aka `email_address_visibility`) that's now in beta on the server, the user's "email" as used as an identifier for them in the Zulip API can be an opaque one made up by the server -- different from `auth.email` aka `delivery_email`. So we need to switch our concept of "own email" to use the identifier-email; this is #3196. The server tells us this user's identifier-email in the `/register` response, so one necessary step is to remember it. Do that. In principle we should then update this value on EVENT_USER_UPDATE. But (a) the same is true of several other values here, and more importantly (b) we already don't handle EVENT_USER_UPDATE at all, either in our `users` state-subtree or in the various denormalized spots where we store other users' emails, avatars, etc. So punt. Changing emails is pretty uncommon; and in the particular case where it's happening for all an org's users en masse because hidden-emails was turned on or off, the only near-term-feasible solution will probably be to have the server just invalidate clients' event queues.
- Loading branch information