lib/ably/models/message_encoders/cipher.rb in ably-0.8.7 vs lib/ably/models/message_encoders/cipher.rb in ably-0.8.8

- old
+ new

@@ -71,13 +71,13 @@ def is_cipher_encoded?(message) !cipher_algorithm(message).nil? end def cipher_algorithm(message) - current_encoding_part(message).to_s[/^#{ENCODING_ID}\+([\w_-]+)$/, 1] + current_encoding_part(message).to_s[/^#{ENCODING_ID}\+([\w-]+)$/, 1] end def already_encrypted?(message) - message.fetch(:encoding, '').to_s.match(%r{(^|/)#{ENCODING_ID}\+([\w_-]+)($|/)}) + message.fetch(:encoding, '').to_s.match(%r{(^|/)#{ENCODING_ID}\+([\w-]+)($|/)}) end end end