twitter: stop trying to filter RTs

* Also remove a %w causing warnings
This commit is contained in:
Chris Sexton 2020-03-26 14:00:08 -04:00 committed by Chris Sexton
parent fcfec95c2f
commit 7148848f77
2 changed files with 2 additions and 2 deletions

View File

@ -77,7 +77,7 @@ func LeaderAll(db *sqlx.DB) ([]Item, error) {
var items []Item var items []Item
err := db.Select(&items, s) err := db.Select(&items, s)
if err != nil { if err != nil {
log.Error().Msgf("Error querying leaderboard: %w", err) log.Error().Msgf("Error querying leaderboard: %s", err)
return nil, err return nil, err
} }
for i := range items { for i := range items {

View File

@ -72,7 +72,7 @@ func (t *Twitter) check(c bot.Connector) {
for _, tweet := range tweets { for _, tweet := range tweets {
userKey := fmt.Sprintf("twitter.last.%s", u) userKey := fmt.Sprintf("twitter.last.%s", u)
lastTweet := int64(t.c.GetInt(userKey, 0)) 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) link := fmt.Sprintf("https://twitter.com/%s/status/%s", u, tweet.IdStr)
log.Debug().Str("tweet", link).Msg("Unknown tweet") log.Debug().Str("tweet", link).Msg("Unknown tweet")
for _, ch := range chs { for _, ch := range chs {