Skip to content

Commit 18109ec

Browse files
authored
Merge pull request #182 from pusher/fix-publish-limit
fix the channels limit for a single publish
2 parents 08af7fb + 8c97aee commit 18109ec

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 2.0.3
4+
5+
* [FIXED] Corrected the channels limit when publishing events. Upped from 10 to 100.
6+
37
## 2.0.2
48

59
* [CHANGED] made encryption_master_key_base64 globally configurable

lib/pusher/client.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def em_http_client(uri)
401401

402402
def trigger_params(channels, event_name, data, params)
403403
channels = Array(channels).map(&:to_s)
404-
raise Pusher::Error, "Too many channels (#{channels.length}), max 10" if channels.length > 10
404+
raise Pusher::Error, "Too many channels (#{channels.length}), max 100" if channels.length > 100
405405

406406
encoded_data = if channels.any?{ |c| c.match(/^private-encrypted-/) } then
407407
raise Pusher::Error, "Cannot trigger to multiple channels if any are encrypted" if channels.length > 1

lib/pusher/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Pusher
2-
VERSION = '2.0.2'
2+
VERSION = '2.0.3'
33
end

spec/client_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@
326326

327327
it "should not allow too many channels" do
328328
expect {
329-
@client.trigger((0..11).map{|i| 'mychannel#{i}'},
329+
@client.trigger((0..101).map{|i| 'mychannel#{i}'},
330330
'event', {'some' => 'data'}, {
331331
:socket_id => "12.34"
332332
})}.to raise_error(Pusher::Error)

0 commit comments

Comments
 (0)