mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-29 18:16:17 +01:00 
			
		
		
		
	dont save user obj in db
This commit is contained in:
		| @@ -281,7 +281,7 @@ SocketUser.follow = function(socket, data, callback) { | ||||
| 	if (!socket.uid || !data) { | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	var userData; | ||||
| 	async.waterfall([ | ||||
| 		function(next) { | ||||
| 			toggleFollow('follow', socket.uid, data.uid, next); | ||||
| @@ -289,15 +289,16 @@ SocketUser.follow = function(socket, data, callback) { | ||||
| 		function(next) { | ||||
| 			user.getUserFields(socket.uid, ['username', 'userslug'], next); | ||||
| 		}, | ||||
| 		function(userData, next) { | ||||
| 		function(_userData, next) { | ||||
| 			userData = _userData; | ||||
| 			notifications.create({ | ||||
| 				bodyShort: '[[notifications:user_started_following_you, ' + userData.username + ']]', | ||||
| 				nid: 'follow:' + data.uid + ':uid:' + socket.uid, | ||||
| 				from: socket.uid, | ||||
| 				user: userData | ||||
| 				from: socket.uid | ||||
| 			}, next); | ||||
| 		}, | ||||
| 		function(notification, next) { | ||||
| 			notification.user = userData; | ||||
| 			notifications.push(notification, [data.uid], next); | ||||
| 		} | ||||
| 	], callback); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user