From c10a3d884dc68bf1453d331064201ee6250e8425 Mon Sep 17 00:00:00 2001 From: benw-pusher <47355547+benw-pusher@users.noreply.github.com> Date: Fri, 19 Aug 2022 15:33:39 +0100 Subject: [PATCH 1/3] fix the channels limiy for a single publish --- lib/pusher/client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 4b9b88981f2f88863f557951f721be3aa896ad3a Mon Sep 17 00:00:00 2001 From: benw-pusher <47355547+benw-pusher@users.noreply.github.com> Date: Fri, 19 Aug 2022 15:40:11 +0100 Subject: [PATCH 2/3] fix tests --- spec/client_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From 8c97aee1d9334552ba04d7ddaa1bbca6a39d77da Mon Sep 17 00:00:00 2001 From: Pusher CI Date: Fri, 19 Aug 2022 14:58:30 +0000 Subject: [PATCH 3/3] Bump to version 2.0.3 --- CHANGELOG.md | 4 ++++ lib/pusher/version.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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/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