lib/bird_grinder/client.rb in birdgrinder-0.1.0.0 vs lib/bird_grinder/client.rb in birdgrinder-0.1.1

- old
+ new

@@ -36,13 +36,13 @@ end # Forwards a given message type (with options) to each handler, # storing the current id if changed. def receive_message(type, options = BirdGrinder::Nash.new) - logger.debug "receiving message: #{type.inspect} - #{options.id}" + logger.debug "receiving message: #{type.inspect} - #{options.id? ? options.id : 'unknown id'}" dispatch(type.to_sym, options) - update_stored_id_for(type, options.id) + update_stored_id_for(type, options.id) if options.id? end # Fetches all direct messages and mentions and also schedules # the next set of updates. # @@ -126,10 +126,10 @@ end def fetch_latest(name, type) options = {} id = stored_id_for(type) - options[:since_id] = id unless id.blank? + options[:since_id] = id unless id.blank? || id.to_i == 0 @tweeter.send(name, options) end end end \ No newline at end of file