amplify.subscribe should allow you to subscribe to multiple messages in a single call. #11

Closed
dcneiner opened this Issue May 25, 2011 · 1 comment

Projects

None yet

3 participants

@dcneiner
Contributor

I would like to be able to use the following code:

amplify.subscribe( "message.save message.update message.new", function () {
   // Do something whenever a message is saved, updated, or created
});

Right now, it would have to be written like this:

var callback = function () {
   // Do something whenever a message is saved, updated, or created
});

amplify.subscribe( "message.save", callback );
amplify.subscribe( "message.update", callback );
amplify.subscribe( "message.new", callback );
@scottgonzalez scottgonzalez added a commit that closed this issue May 30, 2011
@scottgonzalez scottgonzalez Core: Added ability to subscribe to multiple topics at a time. Fixes #11
 - amplify.subscribe should allow you to subscribe to multiple messages in a single call.
d162889
@ifandelse

Thanks a ton for adding this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment