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:
Tim Abbott 2017-10-18 21:13:03 -07:00
parent 31afdd2ff9
commit c61b6d06e5
1 changed files with 1 additions and 0 deletions

View File

@ -152,6 +152,7 @@ def construct_zulip_body(message, realm):
body = body.replace("\x00", "")
body = filter_footer(body)
body += extract_and_upload_attachments(message, realm)
body = body.strip()
if not body:
body = '(No email body)'
return body