|
|
@ -141,12 +141,21 @@ async function sendAPIKeyList(socket) {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Emits the version information to the client.
|
|
|
|
* Emits the version information to the client.
|
|
|
|
* @param {Socket} socket Socket.io socket instance
|
|
|
|
* @param {Socket} socket Socket.io socket instance
|
|
|
|
|
|
|
|
* @param {boolean} hideVersion
|
|
|
|
* @returns {Promise<void>}
|
|
|
|
* @returns {Promise<void>}
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
async function sendInfo(socket) {
|
|
|
|
async function sendInfo(socket, hideVersion = false) {
|
|
|
|
|
|
|
|
let version;
|
|
|
|
|
|
|
|
let latestVersion;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!hideVersion) {
|
|
|
|
|
|
|
|
version = checkVersion.version;
|
|
|
|
|
|
|
|
latestVersion = checkVersion.latestVersion;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
socket.emit("info", {
|
|
|
|
socket.emit("info", {
|
|
|
|
version: checkVersion.version,
|
|
|
|
version,
|
|
|
|
latestVersion: checkVersion.latestVersion,
|
|
|
|
latestVersion,
|
|
|
|
primaryBaseURL: await setting("primaryBaseURL"),
|
|
|
|
primaryBaseURL: await setting("primaryBaseURL"),
|
|
|
|
serverTimezone: await server.getTimezone(),
|
|
|
|
serverTimezone: await server.getTimezone(),
|
|
|
|
serverTimezoneOffset: server.getTimezoneOffset(),
|
|
|
|
serverTimezoneOffset: server.getTimezoneOffset(),
|
|
|
|