mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 20:45:58 +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.uid = socket.uid;
|
||||||
data.req = websockets.reqFromSocket(socket);
|
data.req = websockets.reqFromSocket(socket);
|
||||||
|
data.timestamp = Date.now();
|
||||||
|
|
||||||
topics.reply(data, function(err, postData) {
|
topics.reply(data, function(err, postData) {
|
||||||
if (err) {
|
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);
|
check(content, meta.config.minimumPostLength, meta.config.maximumPostLength, 'content-too-short', 'content-too-long', next);
|
||||||
},
|
},
|
||||||
function(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) {
|
function(_postData, next) {
|
||||||
postData = _postData;
|
postData = _postData;
|
||||||
|
|||||||
Reference in New Issue
Block a user