Subscribe in a way which is currently documented in pusher docs

This commit is contained in:
Piotr Sarnacki 2014-02-27 17:45:43 +01:00
parent 077f555af3
commit be0f601a4c

View File

@ -26,10 +26,8 @@ $.extend Travis.Pusher.prototype,
subscribeAll: (channels) ->
for channel in channels
name = @prefix(channel)
unless @pusher.channels.find(name)
channel = @pusher.channels.add(name, this)
channel.bind_all((event, data) => @receive(event, data))
@pusher.subscribeAll()
channel = @pusher.subscribe(channel)
channel.bind_all((event, data) => @receive(event, data))
subscribe: (channel) ->
console.log("subscribing to #{channel}")