gilgen / ember-pusher

A proper Ember / Pusher integration.
MIT License
100 stars 35 forks source link

PUSHER_SUBSCRIPTIONS in init function #13

Closed pdurkim closed 9 years ago

pdurkim commented 9 years ago

hello again, sorry for asking so many questions on this thread. i appreciate that you are answering them! One more question though (hopefully)!

I have dynamic channel names based off of each user which I'm defining in the init() function of my listening controller like so: init: function(){var channel = this.get('pusher.connection').subscribe('channel_'+user_id); PUSHER_SUBSCRIPTIONS: {channel: ['message_received', 'offer_received']} },

but it seems like defining subscriptions doesn't work like it should. Could you clarify on how it should be subscriptions should be defined in the init?

jcope2013 commented 9 years ago

+1

gilgen commented 9 years ago

Hey, there's actually a bit about this in the README... https://github.com/jamiebikies/ember-pusher#how-do-i-use-this-thing