Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed Pusher.Channel

  • Loading branch information...
commit f244076c3754c2ee59b1f7848f0547f507681581 1 parent 9fe0484
Richard Wang rzhw authored

Showing 1 changed file with 6 additions and 9 deletions. Show diff stats Hide diff stats

  1. +6 9 PusherClientDotNet/Pusher.cs
15 PusherClientDotNet/Pusher.cs
@@ -60,7 +60,7 @@ public Pusher(string application_key, Dictionary<string, object> options)
60 60
61 61 static List<Pusher> instances = new List<Pusher>();
62 62
63   - public Channel Channels(string name)
  63 + public Channel Channel(string name)
64 64 {
65 65 return this.channels[name];
66 66 }
@@ -214,14 +214,11 @@ public void SendLocalEvent(string event_name, Data event_data, string channel_na
214 214 event_data = Pusher.DataDecorator(event_name, event_data);
215 215 if (channel_name != null)
216 216 {
217   - throw new Exception("Code hasn't been ported from Pusher - see comments in source code");
218   - // JS doesn't seem to have "this.channel" anywhere but here...
219   -
220   - //Channel channel = this.channel(channel_name);
221   - //if (channel)
222   - //{
223   - // channel.dispatch_with_all(event_name, event_data);
224   - //}
  217 + if (this.channels.ContainsKey(channel_name))
  218 + {
  219 + Channel channel = this.Channel(channel_name);
  220 + channel.DispatchWithAll(event_name, event_data);
  221 + }
225 222 }
226 223 else
227 224 {

0 comments on commit f244076

Please sign in to comment.
Something went wrong with that request. Please try again.