mirror of
https://github.com/zulip/zulip.git
synced 2026-07-15 21:03:26 +08:00
This refactoring doesn't change behavior, but it sets us up to more easily handle a register setting for `client_gravatar`, which will allow clients to tell us they're going to compute their own gravatar URLs. The `client_gravatar` flag already exists in our code, but it is only used for Django views (users/messages) but not for Zulip events. The main change is to move the call to `set_sender_avatar` into `finalize_payload`, which adds the boolean `client_gravatar` parameter to that function. And then we update various callers to supply that flag. One small performance benefit of this change is that we now lazily compute the client message payloads in `event_queue.process_message_event` now, so this will improve performance if all interested clients have the same value of `apply_markdown`. But the change here is really preparing us for the additional boolean parameter, which will cause us to have four variations of the payload. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| application.py | ||
| descriptors.py | ||
| event_queue.py | ||
| exceptions.py | ||
| handlers.py | ||
| ioloop_logging.py | ||
| socket.py | ||
| views.py | ||
| websocket_client.py | ||