minor tweaks

This commit is contained in:
barisusakli
2015-01-01 13:05:58 -05:00
parent 1ddb90720c
commit 7b49effc14
4 changed files with 13 additions and 13 deletions

View File

@@ -14,7 +14,6 @@ module.exports = function(Posts) {
Posts.create = function(data, callback) {
var uid = data.uid,
tid = data.tid,
handle = data.uid ? null : data.handle, // Only guests have handles!
content = data.content,
timestamp = data.timestamp || Date.now();
@@ -51,8 +50,8 @@ module.exports = function(Posts) {
postData.ip = data.ip;
}
if (handle) {
postData.handle = handle;
if (parseInt(uid, 10) === 0 && data.handle) {
postData.handle = data.handle;
}
plugins.fireHook('filter:post.save', postData, next);