mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-15 19:31:26 +00:00
remove duplicate filter keywords
This commit is contained in:
parent
072bcd366f
commit
492888ffd6
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