mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
Earlier, we used to check whether the length of altered_user_ids was 1 and then create a dict of that user id and the streams that they were added/removed to/from, and optimise our event sending that way. But that was making the code harder to read. Now, we just keep the key of user_streams as a concanated list of user_ids and then add streams accordingly to user_streams. Furthermore we do not check for peer_user_ids before modifying user_streams anymore, since it is very highly unlikely that it will be empty and if it is, send_event can handle it just fine.