Test some logging

This commit is contained in:
idanoo 2023-01-29 20:17:09 +13:00
parent 0ade039548
commit 3ce15400b4
Signed by: idanoo
GPG Key ID: 387387CDBC02F132

View File

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