Log account approval

This commit is contained in:
idanoo 2023-01-29 20:03:50 +13:00
parent de0cd3496a
commit aeb8ce3a5c
Signed by: idanoo
GPG Key ID: 387387CDBC02F132

19
main.go
View File

@ -111,6 +111,25 @@ func handler(w http.ResponseWriter, r *http.Request) {
log.Println(err.Error()) log.Println(err.Error())
return return
} }
} else if i.Event == "account.approved" {
log.Println(r.Body)
// err = sendWebhook(
// fmt.Sprintf(
// "[New Report](%s): **%s** has approved **%s**: %s",
// fmt.Sprintf(
// "https://mastodon.nz/admin/reports/%s",
// i.Object.ID,
// ),
// i.Object.Account.Username,
// i.Object.TargetAccount.Username,
// i.Object.Comment,
// ),
// MATRIX_REPORT_CHANNEL,
// )
// if err != nil {
// log.Println(err.Error())
// return
// }
} }
} }
} }