mirror of
https://github.com/thewesker/twitter_ebooks.git
synced 2025-12-20 12:21:11 -05:00
Update @user when receiving a user_update event.
This commit is contained in:
@@ -260,15 +260,17 @@ module Ebooks
|
|||||||
fire(:message, ev)
|
fire(:message, ev)
|
||||||
|
|
||||||
elsif ev.respond_to?(:name)
|
elsif ev.respond_to?(:name)
|
||||||
if ev.name == :follow
|
case ev.name
|
||||||
|
when :follow
|
||||||
return if ev.source.screen_name.downcase == @username.downcase
|
return if ev.source.screen_name.downcase == @username.downcase
|
||||||
log "Followed by #{ev.source.screen_name}"
|
log "Followed by #{ev.source.screen_name}"
|
||||||
fire(:follow, ev.source)
|
fire(:follow, ev.source)
|
||||||
|
when :favorite, :unfavorite
|
||||||
elsif ev.name == :favorite || ev.name == :unfavorite
|
|
||||||
return if ev.source.screen_name.downcase == @username.downcase # Ignore our own favorites
|
return if ev.source.screen_name.downcase == @username.downcase # Ignore our own favorites
|
||||||
log "@#{ev.source.screen_name} #{ev.name.to_s}d: #{ev.target_object.text}"
|
log "@#{ev.source.screen_name} #{ev.name.to_s}d: #{ev.target_object.text}"
|
||||||
fire(ev.name, ev.source, ev.target_object)
|
fire(ev.name, ev.source, ev.target_object)
|
||||||
|
when :user_update
|
||||||
|
update_user_object ev.source
|
||||||
end
|
end
|
||||||
|
|
||||||
elsif ev.is_a? Twitter::Tweet
|
elsif ev.is_a? Twitter::Tweet
|
||||||
|
|||||||
Reference in New Issue
Block a user