mirror of
https://github.com/idanoo/go-mastodon-matrix-webhooks.git
synced 2024-11-22 08:25:17 +00:00
Test some logging
This commit is contained in:
parent
0ade039548
commit
3ce15400b4
8
main.go
8
main.go
@ -127,17 +127,21 @@ func handler(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
} else if i.Event == "account.approved" {
|
||||
msg := fmt.Sprintf(
|
||||
"Account Approved [%s](%s)",
|
||||
i.Object.Username,
|
||||
"[Account Approved](%s): %s by %s",
|
||||
fmt.Sprintf(
|
||||
"https://mastodon.nz/admin/accounts/%s",
|
||||
i.Object.ID,
|
||||
),
|
||||
i.Object.Username,
|
||||
"test",
|
||||
)
|
||||
|
||||
// Log to stdout
|
||||
log.Println(msg)
|
||||
|
||||
// Debug?
|
||||
log.Println(r.Body)
|
||||
|
||||
// Send to Matrix
|
||||
err = sendWebhook(
|
||||
msg,
|
||||
|
Loading…
Reference in New Issue
Block a user