fix: #9466, don't call leaveRoom in maintenance mode

v1.18.x
Barış Soner Uşaklı 4 years ago
parent a0dd90804c
commit f32ea1737a

@ -231,7 +231,7 @@ app.cacheBuster = null;
};
app.leaveCurrentRoom = function () {
if (!socket) {
if (!socket || config.maintenanceMode) {
return;
}
var previousRoom = app.currentRoom;

@ -27,6 +27,7 @@ apiController.loadConfig = async function (req) {
browserTitle: validator.escape(String(meta.config.browserTitle || meta.config.title || 'NodeBB')),
titleLayout: (meta.config.titleLayout || '{pageTitle} | {browserTitle}').replace(/{/g, '{').replace(/}/g, '}'),
showSiteTitle: meta.config.showSiteTitle === 1,
maintenanceMode: meta.config.maintenanceMode === 1,
minimumTitleLength: meta.config.minimumTitleLength,
maximumTitleLength: meta.config.maximumTitleLength,
minimumPostLength: meta.config.minimumPostLength,

Loading…
Cancel
Save