Merge branch 'master' into fluencydoc_master

# Conflicts:
#	extra/update-version.js
#	server/client.js
#	server/server.js
This commit is contained in:
Louis Lam
2022-04-12 17:44:04 +08:00
140 changed files with 15403 additions and 7817 deletions

View File

@@ -89,6 +89,23 @@ async function sendImportantHeartbeatList(socket, monitorID, toUser = false, ove
}
/**
* Delivers proxy list
*
* @param socket
* @return {Promise<Bean[]>}
*/
async function sendProxyList(socket) {
const timeLogger = new TimeLogger();
const list = await R.find("proxy", " user_id = ? ", [socket.userID]);
io.to(socket.userID).emit("proxyList", list.map(bean => bean.export()));
timeLogger.print("Send Proxy List");
return list;
}
/**
* Emits the version information to the client.
* @param {Socket} socket The socket object that is connected to the client.
@@ -107,6 +124,6 @@ module.exports = {
sendNotificationList,
sendImportantHeartbeatList,
sendHeartbeatList,
sendInfo
sendProxyList,
sendInfo,
};