twitter: filter out retweets

This commit is contained in:
Chris Sexton 2020-01-28 14:45:19 -05:00 committed by Chris Sexton
parent fc18fba2d8
commit 4275619e49
1 changed files with 1 additions and 1 deletions

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 { if lastTweet < tweet.Id && tweet.RetweetedStatus != nil {
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 {