Permalink
Browse files

Pusher.trigger - make socketId optional

  • Loading branch information...
1 parent 0b925a4 commit 6ed8c54be48ed8b06ae56252c172249f2a3fc8f1 @alram alram committed Apr 28, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/node-pusher.js
View
@@ -23,6 +23,10 @@ module.exports = (function() {
}
Pusher.prototype.trigger = function(channel, event, message, socketId, callback) {
+ if (typeof callback === 'undefined') {
+ callback = socketId;
+ socketId = '';
+ }
var timestamp = parseInt(new Date().getTime() / 1000);
var requestBody = JSON.stringify(message);
var hash = crypto.createHash('md5').update(new Buffer(requestBody).toString('binary')).digest('hex');

0 comments on commit 6ed8c54

Please sign in to comment.