This commit is contained in:
Baris Usakli
2013-08-27 14:04:25 -04:00
2 changed files with 17 additions and 12 deletions

View File

@@ -532,10 +532,11 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }),
socket.join('chat_' + uids[0] + '_' + uids[1]);
user.getUserField(uid, 'username', function(err, username) {
var finalMessage = 'New message from <strong>' + username + '</strong>';
var finalMessage = username + ': ' + msg,
notifText = 'New message from <strong>' + username + '</strong>';
if(!isUserOnline(touid)) {
notifications.create(finalMessage, 5, '#', 'notification_' + uid + '_' + touid, function(nid) {
notifications.create(notifText, 5, '#', 'notification_' + uid + '_' + touid, function(nid) {
notifications.push(nid, [touid], function(success) {
});