mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[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
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user