From 7148848f7724a1af53c284a63cecdc6e865c0815 Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Thu, 26 Mar 2020 14:00:08 -0400 Subject: [PATCH] twitter: stop trying to filter RTs * Also remove a %w causing warnings --- plugins/counter/counter.go | 2 +- plugins/twitter/twitter.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/counter/counter.go b/plugins/counter/counter.go index 4e45f81..fc6b92f 100644 --- a/plugins/counter/counter.go +++ b/plugins/counter/counter.go @@ -77,7 +77,7 @@ func LeaderAll(db *sqlx.DB) ([]Item, error) { var items []Item err := db.Select(&items, s) if err != nil { - log.Error().Msgf("Error querying leaderboard: %w", err) + log.Error().Msgf("Error querying leaderboard: %s", err) return nil, err } for i := range items { diff --git a/plugins/twitter/twitter.go b/plugins/twitter/twitter.go index 6b18346..6e229b8 100644 --- a/plugins/twitter/twitter.go +++ b/plugins/twitter/twitter.go @@ -72,7 +72,7 @@ func (t *Twitter) check(c bot.Connector) { for _, tweet := range tweets { userKey := fmt.Sprintf("twitter.last.%s", u) lastTweet := int64(t.c.GetInt(userKey, 0)) - if lastTweet < tweet.Id && tweet.RetweetedStatus != nil { + if lastTweet < tweet.Id { link := fmt.Sprintf("https://twitter.com/%s/status/%s", u, tweet.IdStr) log.Debug().Str("tweet", link).Msg("Unknown tweet") for _, ch := range chs {