mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 18:36:36 +00:00
email_mirror: Strip content before checking for empty emails.
This may fix an exception we were getting of the form: "Error queueing internal message by emailgateway@zulip.com: Message must not be empty".
This commit is contained in:
@@ -152,6 +152,7 @@ def construct_zulip_body(message, realm):
|
|||||||
body = body.replace("\x00", "")
|
body = body.replace("\x00", "")
|
||||||
body = filter_footer(body)
|
body = filter_footer(body)
|
||||||
body += extract_and_upload_attachments(message, realm)
|
body += extract_and_upload_attachments(message, realm)
|
||||||
|
body = body.strip()
|
||||||
if not body:
|
if not body:
|
||||||
body = '(No email body)'
|
body = '(No email body)'
|
||||||
return body
|
return body
|
||||||
|
|||||||
Reference in New Issue
Block a user