mirror of
https://github.com/idanoo/go-mastodon-matrix-webhooks.git
synced 2024-11-22 16:35:17 +00:00
Add link
This commit is contained in:
parent
16c1ab6cd3
commit
87a24c8058
13
main.go
13
main.go
@ -71,7 +71,18 @@ func handler(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
} else if i.Event == "account.created" {
|
} else if i.Event == "account.created" {
|
||||||
country := ipLookup(i.Object.IP)
|
country := ipLookup(i.Object.IP)
|
||||||
err = sendWebhook(fmt.Sprintf("*New Signup* %s (%s) has signed up.%s", i.Object.Username, i.Object.Email, country))
|
err = sendWebhook(
|
||||||
|
fmt.Sprintf(
|
||||||
|
"*New Signup* %s (%s) has signed up.%s\n%s",
|
||||||
|
i.Object.Username,
|
||||||
|
i.Object.Email,
|
||||||
|
country,
|
||||||
|
fmt.Sprintf(
|
||||||
|
"https://mastodon.nz/admin/accounts/%s",
|
||||||
|
i.Object.ID,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err.Error())
|
log.Println(err.Error())
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user