Skip to content

Commit

Permalink
Fixed error message for msgserial while generating json from message
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed Jun 10, 2024
1 parent 1be434f commit 446166a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/ably/models/protocol_message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ def attributes
# 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
Expand Down

0 comments on commit 446166a

Please sign in to comment.