new build_title function to be called via socket

also added categories.getCategoryField and refactored all calls to
getTopicField to be error-first
This commit is contained in:
Julian Lam
2013-08-11 16:12:20 -04:00
parent 04d94a7462
commit e8f1d645fe
9 changed files with 76 additions and 35 deletions

View File

@@ -566,7 +566,7 @@ var utils = require('./../public/src/utils.js'),
User.sendPostNotificationToFollowers = function(uid, tid, pid) {
User.getUserField(uid, 'username', function(username) {
RDB.smembers('followers:' + uid, function(err, followers) {
topics.getTopicField(tid, 'slug', function(slug) {
topics.getTopicField(tid, 'slug', function(err, slug) {
var message = username + ' made a new post';
notifications.create(message, 5, global.nconf.get('url') + 'topic/' + slug + '#' + pid, 'notification_'+ Date.now(), function(nid) {