From 9fbd535b79acf8972d5b8caf1ab5386a18042325 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 9 Jul 2014 16:59:34 -0400 Subject: [PATCH] fixes vote buttons on infinite scroll and new posts --- src/socket.io/posts.js | 3 ++- src/socket.io/topics.js | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/socket.io/posts.js b/src/socket.io/posts.js index 45ccdc2f75..04ef28370e 100644 --- a/src/socket.io/posts.js +++ b/src/socket.io/posts.js @@ -38,7 +38,8 @@ SocketPosts.reply = function(socket, data, callback) { websockets.server.sockets.emit('event:new_post', { posts: [postData], - privileges: privileges + privileges: privileges, + 'reputation:disabled': parseInt(meta.config['reputation:disabled'], 10) === 1 }); module.parent.exports.emitTopicPostStats(); diff --git a/src/socket.io/topics.js b/src/socket.io/topics.js index 67bd523d8a..b1af814351 100644 --- a/src/socket.io/topics.js +++ b/src/socket.io/topics.js @@ -351,6 +351,9 @@ SocketTopics.loadMore = function(socket, data, callback) { }, privileges: function(next) { privileges.topics.get(data.tid, socket.uid, next); + }, + 'reputation:disabled': function(next) { + next(null, parseInt(meta.config['reputation:disabled'], 10) === 1); } }, callback); });