fix timestamp on posts.reply

v1.18.x
barisusakli 9 years ago
parent e26166a45b
commit 3b0eca3be2

@ -30,6 +30,7 @@ SocketPosts.reply = function(socket, data, callback) {
data.uid = socket.uid;
data.req = websockets.reqFromSocket(socket);
data.timestamp = Date.now();
topics.reply(data, function(err, postData) {
if (err) {

@ -230,7 +230,15 @@ module.exports = function(Topics) {
check(content, meta.config.minimumPostLength, meta.config.maximumPostLength, 'content-too-short', 'content-too-long', next);
},
function(next) {
posts.create({uid: uid, tid: tid, handle: data.handle, content: content, toPid: data.toPid, timestamp: data.timestamp, ip: data.req ? data.req.ip : null}, next);
posts.create({
uid: uid,
tid: tid,
handle: data.handle,
content: content,
toPid: data.toPid,
timestamp: data.timestamp,
ip: data.req ? data.req.ip : null
}, next);
},
function(_postData, next) {
postData = _postData;

Loading…
Cancel
Save