mirror of
https://github.com/zulip/zulip.git
synced 2026-07-15 21:03:26 +08:00
Re-enable markup for CUSTOMER1
(imported from commit 3d74260796c85216d71d8261020cc149e0b6ce1c)
This commit is contained in:
parent
04d31a12eb
commit
2a556fd002
@ -172,6 +172,7 @@ def get_stream(stream_name, realm):
|
||||
except Stream.DoesNotExist:
|
||||
return None
|
||||
|
||||
# NB: This function is currently unused, but may come in handy.
|
||||
def linebreak(string):
|
||||
return string.replace('\n\n', '<p/>').replace('\n', '<br/>')
|
||||
|
||||
@ -222,11 +223,7 @@ class Message(models.Model):
|
||||
gravatar_hash = gravatar_hash(self.sender.user.email))
|
||||
|
||||
if apply_markdown:
|
||||
if (self.sender.realm.domain != "customer1.invalid" or
|
||||
self.sending_client.name in ('API', 'github_bot')):
|
||||
obj['content'] = bugdown.convert(self.content)
|
||||
else:
|
||||
obj['content'] = linebreak(escape(self.content))
|
||||
obj['content'] = bugdown.convert(self.content)
|
||||
obj['content_type'] = 'text/html'
|
||||
else:
|
||||
obj['content'] = self.content
|
||||
|
||||
Loading…
Reference in New Issue
Block a user