mirror of https://github.com/zulip/zulip.git
583a6bbadd
This pulls message-related code from models.py into a new module called message.py, and it starts to break some bugdown dependencies. All the methods here are basically related to serializing Message objects as dictionaries for caches and events. extract_message_dict stringify_message_dict message_to_dict message_to_dict_json MessageDict.to_dict_uncached MessageDict.to_dict_uncached_helper MessageDict.build_dict_from_raw_db_row MessageDict.build_message_dict This fix also removes a circular dependency related to get_avatar_url. Also, there was kind of a latent bug in Message.need_to_render_content where it was depending on other calls to Message to import bugdown and set it globally in the namespace. We really need to just eliminate the function, since it's so small and used by code that may be doing very sketchy things, but for now I just fix it. (The bug would possibly be exposed by moving build_message_dict out to the library.) |
||
---|---|---|
.. | ||
fixtures | ||
lib | ||
management | ||
migrations | ||
templatetags | ||
tests | ||
views | ||
worker | ||
__init__.py | ||
context_processors.py | ||
decorator.py | ||
exceptions.py | ||
filters.py | ||
forms.py | ||
logging_handlers.py | ||
middleware.py | ||
models.py | ||
static_header.txt | ||
storage.py | ||
tornadoviews.py |