mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-15 19:31:26 +00:00
Merge pull request #552 from cantino/ignore_duplicate_keywords
remove duplicate filter keywords
This commit is contained in:
commit
358af4b7a2
1 changed files with 3 additions and 1 deletions
|
@ -13,6 +13,8 @@ class TwitterStream
|
|||
end
|
||||
|
||||
def stream!(filters, agent, &block)
|
||||
filters = filters.map(&:downcase).uniq
|
||||
|
||||
stream = Twitter::JSONStream.connect(
|
||||
:path => "/1/statuses/#{(filters && filters.length > 0) ? 'filter' : 'sample'}.json#{"?track=#{filters.map {|f| CGI::escape(f) }.join(",")}" if filters && filters.length > 0}",
|
||||
:ssl => true,
|
||||
|
@ -129,4 +131,4 @@ class TwitterStream
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue