From 71b3ac18fabf45c5b1c4aa22f7b5de888f1c71ae Mon Sep 17 00:00:00 2001 From: Andriy Cherniy Date: Thu, 4 Jan 2024 21:05:56 +0200 Subject: [PATCH] add debug info to inspect issues --- main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.go b/main.go index 60f01be..1c78e45 100755 --- a/main.go +++ b/main.go @@ -239,7 +239,14 @@ notif_loop: }) } + if notif.Type == "mention" { + log.Debugf("post %v mentioned bot", notif.Status.ID) + } + 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) subscribers, err := masto_client.GetAccountFollowers(ctx, masto_user.ID, &mastodon.Pagination{Limit: 10000}) if err != nil { log.Error(err) @@ -256,6 +263,7 @@ notif_loop: } if ok && notif.Status.Visibility == "public" { + log.Debugf("post %v is public and has subscription", notif.Status.ID) if err := db.Create(&Post{ PostId: string(notif.Status.ID), }).Error; err != nil {