Skip to content
This repository has been archived by the owner on Mar 8, 2019. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
erkstruwe committed Jul 24, 2015
1 parent 791564b commit ef3e6ce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/hooks/pubsub/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ module.exports = function(sails) {
*/

broadcast: function(roomName, eventName, data, socketToOmit) {
if (data.previous && _.isFunction(data.previous.toJSON)) {
data.previous = _.clone(data.previous.toJSON(), true);
}
sails.sockets.broadcast(roomName, eventName, data, socketToOmit);
},

Expand Down

0 comments on commit ef3e6ce

Please sign in to comment.