mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 09:22:26 -05: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
|
|
@ -359,10 +359,15 @@ func (p *Processor) processCreateBlockFromFederator(ctx context.Context, federat
|
|||
}
|
||||
|
||||
func (p *Processor) processCreateFlagFromFederator(ctx context.Context, federatorMsg messages.FromFederator) error {
|
||||
// TODO: handle side effects of flag creation:
|
||||
// - send email to admins
|
||||
// - notify admins
|
||||
return nil
|
||||
incomingReport, ok := federatorMsg.GTSModel.(*gtsmodel.Report)
|
||||
if !ok {
|
||||
return errors.New("flag was not parseable as *gtsmodel.Report")
|
||||
}
|
||||
|
||||
// TODO: handle additional side effects of flag creation:
|
||||
// - notify admins by dm / notification
|
||||
|
||||
return p.notifyReport(ctx, incomingReport)
|
||||
}
|
||||
|
||||
// processUpdateAccountFromFederator handles Activity Update and Object Profile
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue