Skip to content

Node.js based forum software built for the modern web

closes #4326

barisusaklic10ec6b81019
diff --git a/src/topics/posts.js b/src/topics/posts.js
index 85f2979513..8177e93ebd 100644
--- a/src/topics/posts.js
+++ b/src/topics/posts.js
@@ -144,6 +144,8 @@ module.exports = function(Topics) {
post.display_moderator_tools = topicPrivileges.isAdminOrMod || post.selfPost;
post.display_move_tools = topicPrivileges.isAdminOrMod && post.index !== 0;
post.display_post_menu = topicPrivileges.isAdminOrMod || post.selfPost || !post.deleted;
+ post.ip = topicPrivileges.isAdminOrMod ? post.ip : undefined;
+
if (post.deleted && !(topicPrivileges.isAdminOrMod || post.selfPost)) {
post.content = '[[topic:post_is_deleted]]';
}