misc fixes

handle spider uids properly
This commit is contained in:
Barış Soner Uşaklı
2018-11-12 00:20:44 -05:00
parent afa84023a2
commit 69bb3293ee
30 changed files with 122 additions and 104 deletions

View File

@@ -19,7 +19,7 @@ SocketGroups.before = function (socket, method, data, next) {
};
SocketGroups.join = function (socket, data, callback) {
if (!parseInt(socket.uid, 10)) {
if (socket.uid <= 0) {
return callback(new Error('[[error:invalid-uid]]'));
}
@@ -60,7 +60,7 @@ SocketGroups.join = function (socket, data, callback) {
};
SocketGroups.leave = function (socket, data, callback) {
if (!parseInt(socket.uid, 10)) {
if (socket.uid <= 0) {
return callback(new Error('[[error:invalid-uid]]'));
}