removed double post notification #1386

This commit is contained in:
barisusakli
2014-04-16 15:46:50 -04:00
parent f9897daad1
commit f0428f5f1f
4 changed files with 4 additions and 30 deletions

View File

@@ -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) {