def process_sync(events)
      return unless events.is_a? Hash
      @since = events['next_batch']
      broadcast(:sync, events)

      @rooms.process_events events['rooms'] if events.key? 'rooms'
    end
def process_sync(events)
      return unless events.is_a? Hash
      @since = events['next_batch']
      broadcast(:sync, events)

      @rooms.process_events events['rooms'] if events.key? 'rooms'
    end
Process the sync result.

 @param events [Hash] The events to sync.