add more info about posts in debug logs

This commit is contained in:
Andriy Cherniy 2024-01-05 01:12:13 +02:00
parent 09f966ee11
commit d3f51c73b5

View file

@ -95,8 +95,7 @@ func main() {
log.Fatal(err)
}
masto_client := mastodon.NewClient(&mastodon.Config{
Server: os.Getenv("MASTODON_HOMESERVER"),
masto_client := mastodon.NewClient(&mastodon.Config{Server: os.Getenv("MASTODON_HOMESERVER"),
ClientID: os.Getenv("MASTODON_CLIENT_ID"),
ClientSecret: os.Getenv("MASTODON_CLIENT_SECRET"),
AccessToken: os.Getenv("MASTODON_ACCESS_TOKEN"),
@ -238,8 +237,7 @@ notif_loop:
if notif.Type == "mention" && notif.Status.InReplyToID == nil && notif.Status.InReplyToAccountID == nil {
log.Debugf(`post passed reply check (%v)
text: %v
actor: %v`, notif.Status.ID, notif.Status.Content, notif.Account.Acct)
raw data: %v`, notif.Status.ID, notif.Status)
subscribers, err := masto_client.GetAccountFollowers(ctx, masto_user.ID, &mastodon.Pagination{Limit: 10000})
if err != nil {
log.Error(err)