mirror of
https://github.com/zulip/zulip.git
synced 2025-10-26 09:34:02 +00:00
markdown: Refactor out additional properties added to Message.
This adds a new class called MessageRenderingResult to contain the additional properties we added to the Message object (like alert_words) as well as the rendered content to ensure typesafe reference. No behavioral change is made except changes in typing. This is a preparatory change for adding django-stubs to the backend. Related: #18777
This commit is contained in:
@@ -75,7 +75,7 @@ def get_default_value_for_history_public_to_subscribers(
|
||||
|
||||
|
||||
def render_stream_description(text: str) -> str:
|
||||
return markdown_convert(text, no_previews=True)
|
||||
return markdown_convert(text, no_previews=True).rendered_content
|
||||
|
||||
|
||||
def send_stream_creation_event(stream: Stream, user_ids: List[int]) -> None:
|
||||
|
||||
Reference in New Issue
Block a user