zulip/zerver/tornado
Steve Howell 88e1e284bb Restructure send-message code for gravatars.
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.
2017-11-07 10:36:02 -08:00
..
__init__.py tornado: Move tornado_ioloop_logging to new zerver/tornado tree. 2016-11-26 21:24:05 -08:00
application.py zerver/tornado: Use python 3 syntax for typing. 2017-10-26 21:58:22 -07:00
descriptors.py zerver/tornado: Remove print_function. 2017-09-27 18:05:45 -07:00
event_queue.py Restructure send-message code for gravatars. 2017-11-07 10:36:02 -08:00
exceptions.py zerver/tornado: Use python 3 syntax for typing. 2017-10-26 21:58:22 -07:00
handlers.py mypy: Add Callable parameters/returns to AsyncDjangoHandler in handlers.py, 2017-10-31 00:03:35 -07:00
ioloop_logging.py zerver/tornado: Remove inheritance from object. 2017-11-06 08:53:48 -08:00
socket.py zerver/tornado: Remove inheritance from object. 2017-11-06 08:53:48 -08:00
views.py decorator: Cut a bunch of dead imports of two view decorators. 2017-11-04 19:27:00 -07:00
websocket_client.py zerver/tornado: Remove inheritance from object. 2017-11-06 08:53:48 -08:00