Skip to content

Node.js based forum software built for the modern web

bind to regular function

barisusaklib5bf2737e4b8
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);
}