Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

send_email: Assert custom email payload is a str.

Anders Kaseorg8b47b5dc34c5
diff --git a/zerver/lib/send_email.py b/zerver/lib/send_email.py
index 1fbbda4b8be..5197c6a3fa4 100644
--- a/zerver/lib/send_email.py
+++ b/zerver/lib/send_email.py
@@ -538,7 +538,9 @@ def custom_email_sender(
# First, we render the Markdown input file just like our
# user-facing docs with render_markdown_path.
with open(plain_text_template_path, "w") as f:
- f.write(parsed_email_template.get_payload())
+ payload = parsed_email_template.get_payload()
+ assert isinstance(payload, str)
+ f.write(payload)
from zerver.lib.templates import render_markdown_path