mirror of https://github.com/zulip/zulip.git
Support displaying emoji in digest and missed PM emails.
(imported from commit b440da2501ccb6dd95dc79c3fbce1e81b17c38f4)
This commit is contained in:
parent
2f59f69a1f
commit
96ea91056e
|
@ -1894,9 +1894,17 @@ def build_message_list(user_profile, messages):
|
|||
# There's a small chance of colliding with non-Zulip URLs containing
|
||||
# "/user_uploads/", but we don't have much information about the
|
||||
# structure of the URL to leverage.
|
||||
return re.sub(
|
||||
content = re.sub(
|
||||
r"/user_uploads/(\S*)",
|
||||
settings.EXTERNAL_HOST + r"/user_uploads/\1", content)
|
||||
# URLs for emoji are of the form
|
||||
# "static/third/gemoji/images/emoji/snowflake.png".
|
||||
content = re.sub(
|
||||
r"static/third/gemoji/images/emoji/",
|
||||
settings.EXTERNAL_HOST + r"/static/third/gemoji/images/emoji/",
|
||||
content)
|
||||
|
||||
return content
|
||||
|
||||
def fix_plaintext_image_urls(content):
|
||||
# Replace image URLs in plaintext content of the form
|
||||
|
|
Loading…
Reference in New Issue