mirror of https://github.com/zulip/zulip.git
Flatten the code for build_message_payload.
(imported from commit b58c91468b36d33c163d4994b501eac796d10e8f)
This commit is contained in:
parent
760d3e78d9
commit
1a679795e1
|
@ -2020,9 +2020,13 @@ def build_message_list(user_profile, messages):
|
||||||
return re.sub(r"\[(\S*)\]\((\S*)\)", r"\2", content)
|
return re.sub(r"\[(\S*)\]\((\S*)\)", r"\2", content)
|
||||||
|
|
||||||
def build_message_payload(message):
|
def build_message_payload(message):
|
||||||
return {'plain': relative_to_full_url(
|
plain = message.content
|
||||||
fix_plaintext_image_urls(message.content)),
|
plain = fix_plaintext_image_urls(plain)
|
||||||
'html': relative_to_full_url(message.rendered_content)}
|
plain = relative_to_full_url(plain)
|
||||||
|
|
||||||
|
html = message.rendered_content
|
||||||
|
html = relative_to_full_url(html)
|
||||||
|
return {'plain': plain, 'html': html}
|
||||||
|
|
||||||
def build_sender_payload(message):
|
def build_sender_payload(message):
|
||||||
sender = sender_string(message)
|
sender = sender_string(message)
|
||||||
|
|
Loading…
Reference in New Issue