mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 12:36:02 +01:00
fix notifs, dont send to self, fix notification path to roomId
This commit is contained in:
@@ -59,7 +59,7 @@ module.exports = function(Messaging) {
|
||||
}
|
||||
|
||||
uids = uids.filter(function(uid, index) {
|
||||
return isOnline[index];
|
||||
return isOnline[index] && parseInt(fromuid, 10) !== parseInt(uid, 10);
|
||||
});
|
||||
|
||||
if (!uids.length) {
|
||||
@@ -71,7 +71,7 @@ module.exports = function(Messaging) {
|
||||
bodyLong: messageObj.content,
|
||||
nid: 'chat_' + fromuid + '_' + roomId,
|
||||
from: fromuid,
|
||||
path: '/chats/' + messageObj.fromUser.username
|
||||
path: '/chats/' + messageObj.roomId
|
||||
}, function(err, notification) {
|
||||
if (!err && notification) {
|
||||
notifications.push(notification, uids, callback);
|
||||
|
||||
Reference in New Issue
Block a user