From 5f9990299f63649a660a2915c8b72417de04c3f2 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 20 Aug 2015 11:23:16 -0400 Subject: [PATCH] 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. --- src/socket.io/user.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/socket.io/user.js b/src/socket.io/user.js index 6621c50242..cb8d80ba87 100644 --- a/src/socket.io/user.js +++ b/src/socket.io/user.js @@ -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) {