Permalink
Browse files

Merge pull request #2 from alram/master

Pusher.trigger - make socketId Optional
  • Loading branch information...
2 parents 0b925a4 + 6ed8c54 commit e495f974cdc2fddb5e6126c19a6f462915eea356 @crossbreeze committed Aug 11, 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 e495f97

Please sign in to comment.