Merge pull request #1622 from bookwyrm-social/email-reports

Include admin and moderator in reporting email
This commit is contained in:
Mouse Reeve 2021-11-18 15:19:33 -08:00 committed by GitHub
commit da39d91b68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,7 +48,7 @@ def moderation_report_email(report):
data["reportee"] = report.user.localname or report.user.username data["reportee"] = report.user.localname or report.user.username
data["report_link"] = report.remote_id data["report_link"] = report.remote_id
for admin in models.User.objects.filter(groups__name="moderator"): for admin in models.User.objects.filter(groups__name__in=["admin", "moderator"]):
data["user"] = admin.display_name data["user"] = admin.display_name
send_email.delay(admin.email, *format_email("moderation_report", data)) send_email.delay(admin.email, *format_email("moderation_report", data))