[smuxi] Engine-Twitter: filter retweets in search stream



commit d427b3f7e483b438cce6fb200643fd4e412e71b9
Author: Mirco Bauer <meebey meebey net>
Date:   Tue Dec 30 12:18:31 2014 +0100

    Engine-Twitter: filter retweets in search stream

 .../Protocols/Twitter/TwitterSearchStream.cs       |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/Engine-Twitter/Protocols/Twitter/TwitterSearchStream.cs 
b/src/Engine-Twitter/Protocols/Twitter/TwitterSearchStream.cs
index 858ec7d..384b196 100644
--- a/src/Engine-Twitter/Protocols/Twitter/TwitterSearchStream.cs
+++ b/src/Engine-Twitter/Protocols/Twitter/TwitterSearchStream.cs
@@ -114,6 +114,12 @@ namespace Smuxi.Engine
                 if (MessageRateLimiter.IsRateLimited) {
                     return;
                 }
+
+                // filter native and old-school retweets
+                if (status.RetweetedStatus != null || status.Text.StartsWith("RT @")) {
+                    return;
+                }
+
                 MessageRateLimiter++;
 
                 var sender = ProtocolManager.GetPerson(status.User);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]