diff --git a/CHANGELOG.md b/CHANGELOG.md index 417fc7e..1f1b2d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.0.3 + +* [FIXED] Corrected the channels limit when publishing events. Upped from 10 to 100. + ## 2.0.2 * [CHANGED] made encryption_master_key_base64 globally configurable diff --git a/lib/pusher/client.rb b/lib/pusher/client.rb index 56707b8..bb7960b 100644 --- a/lib/pusher/client.rb +++ b/lib/pusher/client.rb @@ -401,7 +401,7 @@ def em_http_client(uri) def trigger_params(channels, event_name, data, params) channels = Array(channels).map(&:to_s) - raise Pusher::Error, "Too many channels (#{channels.length}), max 10" if channels.length > 10 + raise Pusher::Error, "Too many channels (#{channels.length}), max 100" if channels.length > 100 encoded_data = if channels.any?{ |c| c.match(/^private-encrypted-/) } then raise Pusher::Error, "Cannot trigger to multiple channels if any are encrypted" if channels.length > 1 diff --git a/lib/pusher/version.rb b/lib/pusher/version.rb index cd359c4..9d1db9e 100644 --- a/lib/pusher/version.rb +++ b/lib/pusher/version.rb @@ -1,3 +1,3 @@ module Pusher - VERSION = '2.0.2' + VERSION = '2.0.3' end diff --git a/spec/client_spec.rb b/spec/client_spec.rb index 5511ffc..f374d1f 100644 --- a/spec/client_spec.rb +++ b/spec/client_spec.rb @@ -326,7 +326,7 @@ it "should not allow too many channels" do expect { - @client.trigger((0..11).map{|i| 'mychannel#{i}'}, + @client.trigger((0..101).map{|i| 'mychannel#{i}'}, 'event', {'some' => 'data'}, { :socket_id => "12.34" })}.to raise_error(Pusher::Error)