send_email: Add support for passing language into send_future_email.

This adds language paramater to send_future_email. As a result, this
properly internationalizes invitation reminder emails, by passing
correct language into send_future_email.

Fixes #11240.
This commit is contained in:
Raymond Akornor
2019-01-09 23:10:44 +00:00
committed by Tim Abbott
parent b9f7b08af2
commit 254bf4c08f
3 changed files with 7 additions and 6 deletions

View File

@@ -267,6 +267,5 @@ def handle_digest_email(user_profile_id: int, cutoff: float,
logger.info("Sending digest email for %s" % (user_profile.email,))
# Send now, as a ScheduledEmail
send_future_email('zerver/emails/digest', user_profile.realm, to_user_ids=[user_profile.id],
from_name="Zulip Digest", from_address=FromAddress.NOREPLY,
context=context)
from_name="Zulip Digest", from_address=FromAddress.NOREPLY, context=context)
return None