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: Support add_context for remote servers.

Alex Vandiver0f2cc383f691
diff --git a/zerver/lib/send_email.py b/zerver/lib/send_email.py
index 8472f1813e2..97750e2b6cd 100644
--- a/zerver/lib/send_email.py
+++ b/zerver/lib/send_email.py
@@ -623,14 +623,18 @@ def send_custom_server_email(
)
for server in remote_servers:
+ context = {
+ "remote_server_email": True,
+ "hostname": server.hostname,
+ "unsubscribe_link": generate_confirmation_link_for_server_deactivation(
+ server, 60 * 24 * 2
+ ),
+ }
+ if add_context is not None:
+ add_context(context, server)
email_sender(
to_email=server.contact_email,
- context={
- "remote_server_email": True,
- "unsubscribe_link": generate_confirmation_link_for_server_deactivation(
- server, 60 * 24 * 2
- ),
- },
+ context=context,
)
if dry_run: