lib/chatterbot/reply.rb in chatterbot-0.9.1 vs lib/chatterbot/reply.rb in chatterbot-0.9.2
- old
+ new
@@ -20,10 +20,12 @@
results = client.mentions_timeline(opts)
@current_tweet = nil
results.each { |s|
update_since_id_reply(s)
- unless ! block_given? || on_blacklist?(s) || skip_me?(s)
+ if has_whitelist? && !on_whitelist?(s)
+ debug "skipping because user not on whitelist"
+ elsif block_given? && !on_blacklist?(s) && !skip_me?(s)
@current_tweet = s
yield s
end
}
@current_tweet = nil