Finish webhook for approved accounts

This commit is contained in:
idanoo 2023-01-29 20:21:09 +13:00
parent 1403583b59
commit ae803d1127
Signed by: idanoo
GPG Key ID: 387387CDBC02F132

View File

@ -127,22 +127,17 @@ func handler(w http.ResponseWriter, r *http.Request) {
}
} else if i.Event == "account.approved" {
msg := fmt.Sprintf(
"[Account Approved](%s): %s by %s",
"[Signup Approved](%s): %s",
fmt.Sprintf(
"https://mastodon.nz/admin/accounts/%s",
i.Object.ID,
),
i.Object.Username,
"test",
)
// Log to stdout
log.Println(msg)
// Debug?
str, _ := json.Marshal(i)
log.Println(string(str))
// Send to Matrix
err = sendWebhook(
msg,