Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
emails: Include marketing unsubscribe link in send_custom_email context.
Tim Abbottbe2d93036d62
diff --git a/zerver/lib/send_email.py b/zerver/lib/send_email.pyindex a759e895db4..439746711e8 100644--- a/zerver/lib/send_email.py+++ b/zerver/lib/send_email.py@@ -23,7 +23,7 @@ from django.utils.timezone import now as timezone_nowfrom django.utils.translation import gettext as _from django.utils.translation import override as override_language-from confirmation.models import generate_key+from confirmation.models import generate_key, one_click_unsubscribe_linkfrom scripts.setup.inline_email_css import inline_templatefrom zerver.lib.logging_util import log_to_filefrom zerver.models import EMAIL_TYPES, Realm, ScheduledEmail, UserProfile, get_user_profile_by_id@@ -464,6 +464,7 @@ def send_custom_email(users: List[UserProfile], options: Dict[str, Any]) -> Nonecontext = {"realm_uri": user_profile.realm.uri,"realm_name": user_profile.realm.name,+ "unsubscribe_link": one_click_unsubscribe_link(user_profile, "marketing"),}send_email(email_id,