mirror of
https://gitea.phreedom.club/localhost_frssoft/mastodon-group-bot.git
synced 2024-11-22 12:29:20 +02:00
Not DM notifications about follow in replies
This commit is contained in:
parent
262a480ffe
commit
8f34b1de88
11
bot.go
11
bot.go
|
@ -146,16 +146,23 @@ func RunBot() {
|
|||
add_to_db(acct)
|
||||
InfoLogger.Printf("%s added to database", acct)
|
||||
}
|
||||
|
||||
if notif.Status.InReplyToID == nil { // Prevent spam in DM if status is reply
|
||||
message := fmt.Sprintf("@%s %s", acct, Conf.NotFollowedMessage)
|
||||
_, err := postToot(message, "direct")
|
||||
if err != nil {
|
||||
ErrorLogger.Printf("Notify %s", acct)
|
||||
}
|
||||
InfoLogger.Printf("%s has been notified", acct)
|
||||
|
||||
mark_notice(acct)
|
||||
if got_notice(acct) == 0 {
|
||||
InfoLogger.Printf("Dooble notice marked")
|
||||
mark_notice(acct)
|
||||
}
|
||||
InfoLogger.Printf("%s marked notification in database", acct)
|
||||
} else {
|
||||
InfoLogger.Printf("%s their status is reply, not notified", acct)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue