parsing the post content that's passed into bodyLong in notifs #1720

This commit is contained in:
Julian Lam
2014-06-21 01:14:49 -04:00
parent f9b5bf83ad
commit d229cd21b2
3 changed files with 36 additions and 12 deletions

View File

@@ -10,6 +10,7 @@ var async = require('async'),
db = require('../database'),
notifications = require('../notifications'),
posts = require('../posts'),
postTools = require('../postTools'),
topics = require('../topics');
(function(UserNotifications) {
@@ -156,7 +157,14 @@ var async = require('async'),
username: async.apply(user.getUserField, uid, 'username'),
slug: async.apply(topics.getTopicField, tid, 'slug'),
postIndex: async.apply(posts.getPidIndex, pid),
postContent: async.apply(posts.getPostField, pid, 'content')
postContent: function(next) {
async.waterfall([
async.apply(posts.getPostField, pid, 'content'),
function(content, next) {
postTools.parse(content, next);
}
], next);
}
}, function(err, results) {
if (err) {
return;