feat: Enhances registration email details

Updates registration approval and denial emails to include the domain name, enhancing context for the recipient.
This commit is contained in:
Kumi 2024-11-16 18:12:41 +01:00
parent ed7a65fa58
commit bcc73e58ba
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -16,7 +16,7 @@ def handle_status_change(sender, instance, created, **kwargs):
if status == UserRegistration.STATUS_APPROVED: if status == UserRegistration.STATUS_APPROVED:
send_mail( send_mail(
"Registration Approved", "Registration Approved",
f"Congratulations, {instance.username}! Your registration has been approved.", f"Congratulations, {instance.username}! Your registration at {settings.MATRIX_DOMAIN} has been approved.",
settings.DEFAULT_FROM_EMAIL, settings.DEFAULT_FROM_EMAIL,
[instance.email], [instance.email],
) )
@ -49,7 +49,7 @@ def handle_status_change(sender, instance, created, **kwargs):
elif status == UserRegistration.STATUS_DENIED: elif status == UserRegistration.STATUS_DENIED:
send_mail( send_mail(
"Registration Denied", "Registration Denied",
f"Sorry, {instance.username}. Your registration request has been denied.", f"Sorry, your registration request at {settings.MATRIX_DOMAIN} has been denied.",
settings.DEFAULT_FROM_EMAIL, settings.DEFAULT_FROM_EMAIL,
[instance.email], [instance.email],
) )