This commit is contained in:
Julian Lam
2020-06-15 15:43:24 -04:00
parent cdf81159df
commit b3115ea813
3 changed files with 4 additions and 3 deletions

View File

@@ -10,7 +10,8 @@ module.exports = function (SocketPosts) {
const timestamps = await posts.diffs.list(data.pid);
const cid = await posts.getCidByPid(data.pid);
const canEdit = await privileges.categories.can('edit', cid, socket.uid);
timestamps.unshift(Date.now());
const postTime = await posts.getPostField(data.pid, 'timestamp');
timestamps.push(postTime);
return {
timestamps: timestamps,
editable: canEdit,