diff options
author | 2023-03-19 13:11:46 +0100 | |
---|---|---|
committer | 2023-03-19 13:11:46 +0100 | |
commit | 7db81cde444f6bc95e79527af0997de1788d48c7 (patch) | |
tree | f6c077ec298a4f018d0870798bc46bd64ba70069 /internal/email/sender.go | |
parent | [docs] Update docs on how to login (#1626) (diff) | |
download | gotosocial-7db81cde444f6bc95e79527af0997de1788d48c7.tar.xz |
[feature] Email notifications for new / closed moderation reports (#1628)
* start fiddling about with email sending to allow multiple recipients
* do some fiddling
* notifs working
* notify on closed report
* finishing up
* envparsing
* use strings.ContainsAny
Diffstat (limited to 'internal/email/sender.go')
-rw-r--r-- | internal/email/sender.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/email/sender.go b/internal/email/sender.go index 13dd26531..b0d883d9d 100644 --- a/internal/email/sender.go +++ b/internal/email/sender.go @@ -35,6 +35,17 @@ type Sender interface { // SendTestEmail sends a 'testing email sending' style email to the given toAddress, with the given data. SendTestEmail(toAddress string, data TestData) error + + // SendNewReportEmail sends an email notification to the given addresses, letting them + // know that a new report has been created targeting a user on this instance. + // + // It is expected that the toAddresses have already been filtered to ensure that they + // all belong to admins + moderators. + SendNewReportEmail(toAddresses []string, data NewReportData) error + + // SendReportClosedEmail sends an email notification to the given address, letting them + // know that a report that they created has been closed / resolved by an admin. + SendReportClosedEmail(toAddress string, data ReportClosedData) error } // NewSender returns a new email Sender interface with the given configuration, or an error if something goes wrong. |