lib/submodules/ably-ruby/lib/ably/realtime/channel.rb in ably-rest-1.2.4 vs lib/submodules/ably-ruby/lib/ably/realtime/channel.rb in ably-rest-1.2.6

- old
+ new

@@ -40,11 +40,11 @@ # The current {Abbly::Realtime::Channel::STATE} of the channel. # # @spec RTL2b # - # The permited states for this channel + # The permitted states for this channel STATE = ruby_enum('STATE', :initialized, :attaching, :attached, :detaching, @@ -330,10 +330,11 @@ # @yield [Ably::Models::PaginatedResult<Ably::Models::Message>] First {Ably::Models::PaginatedResult page} of {Ably::Models::Message} objects accessible with {Ably::Models::PaginatedResult#items #items}. # # @return [Ably::Util::SafeDeferrable] # def history(options = {}, &callback) + # RTL10b if options.delete(:until_attach) unless attached? error = Ably::Exceptions::InvalidRequest.new('option :until_attach is invalid as the channel is not attached' ) return Ably::Util::SafeDeferrable.new_and_fail_immediately(logger, error) end @@ -361,11 +362,11 @@ # # @param channel_options [Hash, Ably::Models::ChannelOptions] A hash of options or a {Ably::Models::ChannelOptions} # @return [Ably::Models::ChannelOptions] def set_options(channel_options) @options = Ably::Models::ChannelOptions(channel_options) - - manager.request_reattach if need_reattach? + # RTL4i + manager.request_reattach if (need_reattach? and connection.state?(:connected)) end alias options= set_options # @api private def set_channel_error_reason(error)