confirmation: Remove custom_body argument from send_confirmation.

This commit is contained in:
Rishi Gupta 2017-06-10 15:26:23 -07:00 committed by Tim Abbott
parent 9def5bdea1
commit e30211a524
2 changed files with 4 additions and 6 deletions

View File

@ -90,14 +90,12 @@ class ConfirmationManager(models.Manager):
# type: () -> int
return getattr(settings, 'EMAIL_CONFIRMATION_DAYS', 10)
def send_confirmation(self, obj, template_prefix, to_email, additional_context=None,
host=None, custom_body=None):
# type: (ContentType, str, Text, Optional[Dict[str, Any]], Optional[str], Optional[str]) -> Confirmation
def send_confirmation(self, obj, template_prefix, to_email, additional_context=None, host=None):
# type: (ContentType, str, Text, Optional[Dict[str, Any]], Optional[str]) -> Confirmation
confirmation_key = generate_key()
activate_url = self.get_activation_url(confirmation_key, host=host)
context = {
'activate_url': activate_url,
'custom_body': custom_body,
}
if additional_context is not None:
context.update(additional_context)

View File

@ -3053,12 +3053,12 @@ def do_send_confirmation_email(invitee, referrer, body):
`invitee` is a PreregistrationUser.
`referrer` is a UserProfile.
"""
context = {'referrer': referrer}
context = {'referrer': referrer, 'custom_body': body}
template_prefix = 'zerver/emails/invitation'
Confirmation.objects.send_confirmation(
invitee, template_prefix, invitee.email, additional_context=context,
host=referrer.realm.host, custom_body=body)
host=referrer.realm.host)
def is_inactive(email):
# type: (Text) -> None