add debug info to inspect issues
This commit is contained in:
parent
36b3b5f256
commit
71b3ac18fa
1 changed files with 8 additions and 0 deletions
8
main.go
8
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 {
|
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})
|
subscribers, err := masto_client.GetAccountFollowers(ctx, masto_user.ID, &mastodon.Pagination{Limit: 10000})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
|
@ -256,6 +263,7 @@ notif_loop:
|
||||||
}
|
}
|
||||||
|
|
||||||
if ok && notif.Status.Visibility == "public" {
|
if ok && notif.Status.Visibility == "public" {
|
||||||
|
log.Debugf("post %v is public and has subscription", notif.Status.ID)
|
||||||
if err := db.Create(&Post{
|
if err := db.Create(&Post{
|
||||||
PostId: string(notif.Status.ID),
|
PostId: string(notif.Status.ID),
|
||||||
}).Error; err != nil {
|
}).Error; err != nil {
|
||||||
|
|
Loading…
Reference in a new issue