more fixes

This commit is contained in:
Baris Usakli
2013-07-03 12:14:20 -04:00
parent 1e40ed28e5
commit 98013536d1
9 changed files with 105 additions and 140 deletions

View File

@@ -233,11 +233,16 @@ var RDB = require('./redis.js'),
ThreadTools.notify_followers = function(tid, exceptUid) {
async.parallel([
function(next) {
topics.get_topic(tid, 0, function(threadData) {
notifications.create(threadData.teaser_username + ' has posted a reply to: "' + threadData.title + '"', null, '/topic/' + tid, 'topic:' + tid, function(nid) {
next(null, nid);
topics.getTopicField(tid, 'title', function(title) {
topics.get_teaser(tid, function(teaser) {
notifications.create(teaser.username + ' has posted a reply to: "' + title + '"', null, '/topic/' + tid, 'topic:' + tid, function(nid) {
next(null, nid);
});
});
});
},
function(next) {
ThreadTools.get_followers(tid, function(err, followers) {