mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
markdown: Clean render_markdown.
Remove Message is None and not None case as the render_message_backend passes a fake Message object.
This commit is contained in:
committed by
Tim Abbott
parent
1e453981a3
commit
3b4ff4f75c
@@ -513,7 +513,6 @@ def render_markdown(message: Message,
|
||||
else:
|
||||
message_user_ids = user_ids
|
||||
|
||||
if message is not None:
|
||||
message.mentions_wildcard = False
|
||||
message.mentions_user_ids = set()
|
||||
message.mentions_user_group_ids = set()
|
||||
@@ -529,11 +528,6 @@ def render_markdown(message: Message,
|
||||
if user_id in message_user_ids:
|
||||
possible_words.update(set(words))
|
||||
|
||||
if message is None:
|
||||
# If we don't have a message, then we are in the compose preview
|
||||
# codepath, so we know we are dealing with a human.
|
||||
sent_by_bot = False
|
||||
else:
|
||||
sent_by_bot = get_user_profile_by_id(message.sender_id).is_bot
|
||||
|
||||
# DO MAIN WORK HERE -- call bugdown to convert
|
||||
|
||||
Reference in New Issue
Block a user