gilgen / ember-pusher

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

Variable pusherSubscriptions #1

Open gilgen opened 11 years ago

gilgen commented 11 years ago

Right now, PUSHER_SUBSCRIPTIONS is a constant and any modifications to it at runtime (other than during controller's init()) will be ignored.

Make EmberPusher.Bindings watch pusherSubscriptions and subscribe/unsubscribe as the user adds and removes channels/events to the hash.

edborden commented 10 years ago

Yes please.

gilgen commented 10 years ago

@edborden I don't have time right now, but if you want to take a stab at it and submit a PR that's cool! :)

mmun commented 10 years ago

Current

PUSHER_SUBSCRIPTIONS: {
  my-channel: ['pusher:subscription_succeeded']
}

Proposed

PUSHER_SUBSCRIPTIONS: [
  { channel: "my-channel", events: ['pusher:subscription_succeeded'] }
]
gilgen commented 10 years ago

I would propose that if the property is bound, we use the name pusherSubscriptions. I chose PUSHER_SUBSCRIPTIONS originally to hopefully make it clear that it's not bound.

mmun commented 10 years ago

@jamiebikies Ya, totally agree.

vasilakisfil commented 9 years ago

Any update on that? I also need variable channel names. How you guys managed to do that ?

gilgen commented 9 years ago

We haven't implemented it yet, unfortunately. I haven't had the time lately to do it :sob: