lib/submodules/ably-ruby/lib/ably/realtime/channel.rb in ably-rest-0.9.1 vs lib/submodules/ably-ruby/lib/ably/realtime/channel.rb in ably-rest-0.9.2
- old
+ new
@@ -297,11 +297,14 @@
@queue
end
def setup_event_handlers
__incoming_msgbus__.subscribe(:message) do |message|
- message.decode self
+ message.decode(client.encoders, options) do |encode_error, error_message|
+ client.logger.error error_message
+ emit :error, encode_error
+ end
emit_message message.name, message
end
on(STATE.Attached) do
process_queue
@@ -385,10 +388,13 @@
)
end
def create_message(message)
Ably::Models::Message(message.dup).tap do |msg|
- msg.encode self
+ msg.encode(client.encoders, options) do |encode_error, error_message|
+ client.logger.error error_message
+ emit :error, encode_error
+ end
end
end
def rest_channel
client.rest_client.channel(name)