From b5bf2737e4b84f4548a4f6384fb835b5d376d87c Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 12 Aug 2016 02:09:11 +0300 Subject: [PATCH] bind to regular function --- src/socket.io/user/ban.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/socket.io/user/ban.js b/src/socket.io/user/ban.js index d52251d76d..070fdf5566 100644 --- a/src/socket.io/user/ban.js +++ b/src/socket.io/user/ban.js @@ -16,7 +16,9 @@ module.exports = function(SocketUser) { } } - toggleBan(socket.uid, data.uids, banUser.bind(null, data.until || 0), function(err) { + toggleBan(socket.uid, data.uids, function(uid, next) { + banUser(data.until || 0, uid, next); + }, function(err) { if (err) { return callback(err); }