Pass a notification path when a user follows another

When a user followed another, a notification is created, but with
no path, so on plugins like pushbullet, it would default to trying
to build a topic url, but the required values were null, leading to
a broken url.
v1.18.x
Julian Lam 10 years ago
parent fdb3046224
commit 5f9990299f

@ -310,7 +310,8 @@ SocketUser.follow = function(socket, data, callback) {
notifications.create({
bodyShort: '[[notifications:user_started_following_you, ' + userData.username + ']]',
nid: 'follow:' + data.uid + ':uid:' + socket.uid,
from: socket.uid
from: socket.uid,
path: '/user/' + userData.userslug
}, next);
},
function(notification, next) {

Loading…
Cancel
Save