This commit is contained in:
Julian Lam
2015-07-24 10:22:21 -04:00
parent ee9390ee34
commit 87111ee6be
2 changed files with 10 additions and 0 deletions

View File

@@ -57,6 +57,11 @@ module.exports = function(Topics) {
var tidToPost = {};
async.each(postData, function(post, next) {
// If the post author isn't represented in the retrieved users' data, then it means they were deleted, assume guest.
if (!users.hasOwnProperty(post.uid)) {
post.uid = 0;
}
post.user = users[post.uid];
post.timestamp = utils.toISOString(post.timestamp);
tidToPost[post.tid] = post;