mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-23 10:41:15 +02:00
fix: fix display post history
This commit is contained in:
@@ -27,6 +27,7 @@ module.exports = function (SocketPosts) {
|
|||||||
canDelete: privileges.posts.canDelete(data.pid, socket.uid),
|
canDelete: privileges.posts.canDelete(data.pid, socket.uid),
|
||||||
canPurge: privileges.posts.canPurge(data.pid, socket.uid),
|
canPurge: privileges.posts.canPurge(data.pid, socket.uid),
|
||||||
canFlag: privileges.posts.canFlag(data.pid, socket.uid),
|
canFlag: privileges.posts.canFlag(data.pid, socket.uid),
|
||||||
|
canViewHistory: privileges.posts.can('posts:history', data.pid, socket.uid),
|
||||||
flagged: flags.exists('post', data.pid, socket.uid), // specifically, whether THIS calling user flagged
|
flagged: flags.exists('post', data.pid, socket.uid), // specifically, whether THIS calling user flagged
|
||||||
bookmarked: posts.hasBookmarked(data.pid, socket.uid),
|
bookmarked: posts.hasBookmarked(data.pid, socket.uid),
|
||||||
postSharing: social.getActivePostSharing(),
|
postSharing: social.getActivePostSharing(),
|
||||||
@@ -46,7 +47,7 @@ module.exports = function (SocketPosts) {
|
|||||||
postData.display_move_tools = results.isAdmin || results.isModerator;
|
postData.display_move_tools = results.isAdmin || results.isModerator;
|
||||||
postData.display_change_owner_tools = results.isAdmin || results.isModerator;
|
postData.display_change_owner_tools = results.isAdmin || results.isModerator;
|
||||||
postData.display_ip_ban = (results.isAdmin || results.isGlobalMod) && !postData.selfPost;
|
postData.display_ip_ban = (results.isAdmin || results.isGlobalMod) && !postData.selfPost;
|
||||||
postData.display_history = results.history;
|
postData.display_history = results.history && results.canViewHistory;
|
||||||
postData.flags = {
|
postData.flags = {
|
||||||
flagId: parseInt(results.posts.flagId, 10) || null,
|
flagId: parseInt(results.posts.flagId, 10) || null,
|
||||||
can: results.canFlag.flag,
|
can: results.canFlag.flag,
|
||||||
|
|||||||
Reference in New Issue
Block a user