mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-15 05:33:02 -06: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:
parent
9c55c07be9
commit
7db81cde44
35 changed files with 773 additions and 420 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue