mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-31 19:15:58 +01:00
fixing upgrade script console.log and missing sessionData for topic moving
This commit is contained in:
@@ -147,6 +147,7 @@ Sockets.init = function() {
|
|||||||
server: io,
|
server: io,
|
||||||
userSockets: userSockets
|
userSockets: userSockets
|
||||||
},
|
},
|
||||||
|
signatureLen = methodToCall.length,
|
||||||
socketArgs = [];
|
socketArgs = [];
|
||||||
|
|
||||||
// Construct the arguments that'll get passed into each socket method
|
// Construct the arguments that'll get passed into each socket method
|
||||||
@@ -156,6 +157,10 @@ Sockets.init = function() {
|
|||||||
if (callback !== undefined) {
|
if (callback !== undefined) {
|
||||||
socketArgs.push(callback);
|
socketArgs.push(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do not execute the requested method if the signature is not correct
|
||||||
|
console.log('expecting', signatureLen, 'sending', socketArgs.length);
|
||||||
|
|
||||||
socketArgs.push(sessionData);
|
socketArgs.push(sessionData);
|
||||||
|
|
||||||
// Call the requested method
|
// Call the requested method
|
||||||
@@ -166,6 +171,11 @@ Sockets.init = function() {
|
|||||||
} else {
|
} else {
|
||||||
methodToCall.apply(Namespaces, socketArgs);
|
methodToCall.apply(Namespaces, socketArgs);
|
||||||
}
|
}
|
||||||
|
// } catch (err) {
|
||||||
|
// console.log('HEREHEHREH');
|
||||||
|
// winston.error('[socket.io] Error executing socket method (' + payload.name + '). Dropping.');
|
||||||
|
// winston.error('[socket.io] ' + err.message);
|
||||||
|
// }
|
||||||
// winston.info('[socket.io] Executing: ' + payload.name);
|
// winston.info('[socket.io] Executing: ' + payload.name);
|
||||||
} else {
|
} else {
|
||||||
winston.warn('[socket.io] Unrecognized message: ' + payload.name);
|
winston.warn('[socket.io] Unrecognized message: ' + payload.name);
|
||||||
|
|||||||
@@ -175,8 +175,8 @@ SocketTopics.movePost = function(data, callback, sessionData) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
SocketTopics.move = function(data) {
|
SocketTopics.move = function(data, sessionData) {
|
||||||
threadTools.move(data.tid, data.cid, socket);
|
threadTools.move(data.tid, data.cid, sessionData.socket);
|
||||||
};
|
};
|
||||||
|
|
||||||
SocketTopics.followCheck = function(tid, callback, sessionData) {
|
SocketTopics.followCheck = function(tid, callback, sessionData) {
|
||||||
|
|||||||
@@ -385,7 +385,6 @@ Upgrade.upgrade = function(callback) {
|
|||||||
updatesMade = true;
|
updatesMade = true;
|
||||||
|
|
||||||
db.getObjectValues('username:uid', function(err, uids) {
|
db.getObjectValues('username:uid', function(err, uids) {
|
||||||
console.log(uids);
|
|
||||||
async.eachSeries(uids, function(uid, next) {
|
async.eachSeries(uids, function(uid, next) {
|
||||||
Groups.joinByGroupName('registered-users', uid, next);
|
Groups.joinByGroupName('registered-users', uid, next);
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user