garufa 1.1.0.rc.2 → 1.1.0.rc.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- 4311
1
+ 7939
@@ -22,16 +22,21 @@ module Garufa
22
22
 
23
23
  def notify(channels, event, options = {})
24
24
  channels.each do |channel|
25
- subscriptions[channel].each do |sub|
25
+ notify_channel(channel, event, options)
26
+ end
27
+ end
28
+
29
+ def notify_channel(channel, event, options)
30
+ return if channel_size(channel) == 0
26
31
 
27
- # Skip notifying if the same socket_id is provided
28
- next if sub.socket_id == options[:socket_id]
32
+ subscriptions[channel].each do |sub|
33
+ # Skip notifying if the same socket_id is provided
34
+ next if sub.socket_id == options[:socket_id]
29
35
 
30
- # Skip notifying the same member (probably from different tabs)
31
- next if sub.presence_channel? and sub.channel_data == options[:data]
36
+ # Skip notifying the same member (probably from different tabs)
37
+ next if sub.presence_channel? and sub.channel_data == options[:data]
32
38
 
33
- sub.notify Message.channel_event(channel, event, options[:data])
34
- end
39
+ sub.notify Message.channel_event(channel, event, options[:data])
35
40
  end
36
41
  end
37
42
 
@@ -1,3 +1,3 @@
1
1
  module Garufa
2
- VERSION = '1.1.0.rc.2'
2
+ VERSION = '1.1.0.rc.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: garufa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.rc.2
4
+ version: 1.1.0.rc.3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors: