lib/chatterbot/streaming.rb in chatterbot-0.9.1 vs lib/chatterbot/streaming.rb in chatterbot-0.9.2
- old
+ new
@@ -29,11 +29,11 @@
debug object
case object
when Twitter::Tweet
if object.user == authenticated_user
- puts "skipping #{object} because it's from me"
+ debug "skipping #{object} because it's from me"
elsif streamer.tweet_handler && !on_blacklist?(object) && !skip_me?(object)
@current_tweet = object
streamer.tweet_handler.call object
@current_tweet = nil
end
@@ -47,10 +47,10 @@
streamer.dm_handler.call object
@current_tweet = nil
end
when Twitter::Streaming::Event
if object.respond_to?(:source) && object.source == authenticated_user
- puts "skipping #{object} because it's from me"
+ debug "skipping #{object} because it's from me"
elsif object.name == :follow && streamer.follow_handler
streamer.follow_handler.call(object.source)
elsif object.name == :favorite && streamer.favorite_handler
streamer.favorite_handler.call(object.source, object.target_object)
end