mirror of
https://gitea.phreedom.club/localhost_frssoft/mastodon-group-bot
synced 2024-11-21 21:21:29 +00:00
bug fix
This commit is contained in:
parent
30a93f2466
commit
ead673bf2d
6
bot.go
6
bot.go
|
@ -70,6 +70,12 @@ func RunBot() {
|
||||||
content := notif.Status.Content
|
content := notif.Status.Content
|
||||||
tooturl := notif.Status.URL
|
tooturl := notif.Status.URL
|
||||||
|
|
||||||
|
if check_following(followers, acct) {
|
||||||
|
fmt.Println("True")
|
||||||
|
} else {
|
||||||
|
fmt.Println("False")
|
||||||
|
}
|
||||||
|
|
||||||
// Follow check
|
// Follow check
|
||||||
if check_following(followers, acct) {
|
if check_following(followers, acct) {
|
||||||
if notif.Status.Visibility == "public" { // Reblog toot
|
if notif.Status.Visibility == "public" { // Reblog toot
|
||||||
|
|
|
@ -18,13 +18,13 @@ func DeleteNotices() {
|
||||||
LoggerInit()
|
LoggerInit()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
|
time.Sleep(time.Duration(Conf.Del_notices_interval) * time.Minute)
|
||||||
|
|
||||||
statuses, err := c.GetAccountStatuses(ctx, my_account.ID, &mastodon.Pagination{Limit: 60})
|
statuses, err := c.GetAccountStatuses(ctx, my_account.ID, &mastodon.Pagination{Limit: 60})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ErrorLogger.Println("Get account statuses")
|
ErrorLogger.Println("Get account statuses")
|
||||||
}
|
}
|
||||||
|
|
||||||
time.Sleep(time.Duration(Conf.Del_notices_interval) * time.Minute)
|
|
||||||
|
|
||||||
if len(statuses) > 0 {
|
if len(statuses) > 0 {
|
||||||
for i := range statuses {
|
for i := range statuses {
|
||||||
if statuses[i].Visibility == "direct" {
|
if statuses[i].Visibility == "direct" {
|
||||||
|
|
Loading…
Reference in a new issue