updating notifications.create to accept a hash instead of discrete arguments - breaking change

This commit is contained in:
Julian Lam
2014-02-15 14:52:59 -05:00
parent 17ae56e555
commit aba1b95cac
5 changed files with 44 additions and 29 deletions

View File

@@ -103,7 +103,11 @@ SocketModules.chats.send = function(socket, data) {
notifText = 'New message from <strong>' + username + '</strong>';
if (!module.parent.exports.isUserOnline(touid)) {
notifications.create(notifText, 'javascript:app.openChat(&apos;' + username + '&apos;, ' + socket.uid + ');', 'notification_' + socket.uid + '_' + touid, function(nid) {
notifications.create({
text: notifText,
path: 'javascript:app.openChat(&apos;' + username + '&apos;, ' + socket.uid + ');',
uniqueId: 'notification_' + socket.uid + '_' + touid
}, function(nid) {
notifications.push(nid, [touid], function(success) {
});