lib/submodules/ably-ruby/lib/ably/models/protocol_message.rb in ably-rest-1.2.6 vs lib/submodules/ably-ruby/lib/ably/models/protocol_message.rb in ably-rest-1.2.7
- old
+ new
@@ -247,10 +247,9 @@
end
# Return a JSON ready object from the underlying #attributes using Ably naming conventions for keys
def as_json(*args)
raise TypeError, ':action is missing, cannot generate a valid Hash for ProtocolMessage' unless action
- raise TypeError, ':msg_serial is missing, cannot generate a valid Hash for ProtocolMessage' if ack_required? && !has_message_serial?
attributes.dup.tap do |hash_object|
hash_object['action'] = action.to_i
hash_object['messages'] = messages.map(&:as_json) unless messages.empty?
hash_object['presence'] = presence.map(&:as_json) unless presence.empty?