Add user count message

This commit is contained in:
idanoo 2023-01-30 11:45:30 +13:00
parent 9bc4bc3466
commit aec56e7352
Signed by: idanoo
GPG key ID: 387387CDBC02F132

View file

@ -3,6 +3,7 @@ package gomastodonstats
import (
"bytes"
"encoding/json"
"fmt"
"log"
"net/http"
)
@ -19,7 +20,7 @@ func sendToMatrix(m []metric) {
}
startOfDay := getStartofDay()
sendMatrixWebhook(startOfDay.String(), MATRIX_WEBHOOK_CHANNEL)
sendMatrixWebhook(fmt.Sprintf("*User counts for %s*", startOfDay.String()), MATRIX_WEBHOOK_CHANNEL)
for _, m := range m {
sendMatrixWebhook(getPrintableString(m), MATRIX_WEBHOOK_CHANNEL)
}