Skip to content

Node.js based forum software built for the modern web

linting, minor bugfix, moving hiredis to optional deps

Julian Lam3ab730619913
diff --git a/package.json b/package.json
index fc502747a8..f118552fe2 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,6 @@
"dependencies": {
"socket.io": "~0.9.16",
"redis": "0.8.3",
- "hiredis" : "~0.1.15",
"express": "3.2.0",
"express-namespace": "~0.1.1",
"emailjs": "0.3.4",
@@ -42,6 +41,9 @@
"uglify-js": "~2.4.0",
"validator": "~1.5.1"
},
+ "optionalDependencies": {
+ "hiredis" : "~0.1.15",
+ },
"bugs": {
"url": "https://github.com/designcreateplay/NodeBB/issues"
},
diff --git a/src/posts.js b/src/posts.js
index e824088237..ab9bacd67b 100644
--- a/src/posts.js
+++ b/src/posts.js
@@ -30,11 +30,13 @@ var RDB = require('./redis.js'),
callback([]);
}
});
- }
+ };
Posts.addUserInfoToPost = function(post, callback) {
user.getUserFields(post.uid, ['username', 'userslug', 'reputation', 'postcount', 'picture', 'signature', 'banned'], function(err, userData) {
- if (err) return callback();
+ if (err) {
+ return callback();
+ }
postTools.parse(userData.signature, function(err, signature) {
post.username = userData.username || 'anonymous';
@@ -58,7 +60,7 @@ var RDB = require('./redis.js'),
}
});
});
- }
+ };
Posts.getPostSummaryByPids = function(pids, callback) {
@@ -184,7 +186,7 @@ var RDB = require('./redis.js'),
postData.uploadedImages = [];
}
- postTools.toHTML(postData.content, function(err, content) {
+ postTools.parse(postData.content, function(err, content) {
postData.content = content;
posts.push(postData);
});