Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
email_notifications: Give absolute path to html2text.
Anders Kaseorg7c992422f01e
diff --git a/zerver/lib/email_notifications.py b/zerver/lib/email_notifications.pyindex 38ff847dc65..372ca2bab99 100644--- a/zerver/lib/email_notifications.py+++ b/zerver/lib/email_notifications.py@@ -1,8 +1,10 @@# See https://zulip.readthedocs.io/en/latest/subsystems/notifications.htmlimport logging+import osimport reimport subprocess+import sysfrom collections import defaultdictfrom datetime import timedeltafrom email.headerregistry import Address@@ -705,7 +707,9 @@ def enqueue_welcome_emails(user: UserProfile, realm_creation: bool = False) -> Ndef convert_html_to_markdown(html: str) -> str:# html2text is GPL licensed, so run it as a subprocess.- markdown = subprocess.check_output(["html2text"], input=html, text=True).strip()+ markdown = subprocess.check_output(+ [os.path.join(sys.prefix, "bin", "html2text")], input=html, text=True+ ).strip()# We want images to get linked and inline previewed, but html2text will turn# them into links of the form ``, which is