mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
fix timestamp on posts.reply
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user