From 4275619e4968e1104882e3040c5ea88b640a83d4 Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Tue, 28 Jan 2020 14:45:19 -0500 Subject: [PATCH] twitter: filter out retweets --- plugins/twitter/twitter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/twitter/twitter.go b/plugins/twitter/twitter.go index 6e229b8..6b18346 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 { + if lastTweet < tweet.Id && tweet.RetweetedStatus != nil { link := fmt.Sprintf("https://twitter.com/%s/status/%s", u, tweet.IdStr) log.Debug().Str("tweet", link).Msg("Unknown tweet") for _, ch := range chs {