mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-11-03 20:45:58 +01:00 
			
		
		
		
	removed double post notification #1386
This commit is contained in:
		@@ -148,27 +148,6 @@ var async = require('async'),
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	UserNotifications.sendPostNotificationToFollowers = function(uid, tid, pid) {
 | 
			
		||||
		user.getUserField(uid, 'username', function(err, username) {
 | 
			
		||||
			db.getSetMembers('followers:' + uid, function(err, followers) {
 | 
			
		||||
				if (followers && followers.length) {
 | 
			
		||||
					topics.getTopicField(tid, 'slug', function(err, slug) {
 | 
			
		||||
						var message = '[[notifications:user_made_post, ' + username + ']]';
 | 
			
		||||
 | 
			
		||||
						notifications.create({
 | 
			
		||||
							text: message,
 | 
			
		||||
							path: nconf.get('relative_path') + '/topic/' + slug + '#' + pid,
 | 
			
		||||
							uniqueId: 'topic:' + tid,
 | 
			
		||||
							from: uid
 | 
			
		||||
						}, function(nid) {
 | 
			
		||||
							notifications.push(nid, followers);
 | 
			
		||||
						});
 | 
			
		||||
					});
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	UserNotifications.pushCount = function(uid) {
 | 
			
		||||
		var websockets = require('./../socket.io');
 | 
			
		||||
		UserNotifications.getUnreadCount(uid, function(err, count) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user