Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
Labels

Comments

@dcneiner
Copy link
Contributor

@dcneiner dcneiner commented May 25, 2011

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 );
@ifandelse
Copy link

@ifandelse ifandelse commented May 30, 2011

Thanks a ton for adding this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants