fix: #7118, invoking autoLocale middleware on logout

Also:
- firing client-side hook on header update
- updating bootbox locale on header update
This commit is contained in:
Julian Lam
2018-12-20 13:59:34 -05:00
parent 792dce1496
commit 900f0a0b78
2 changed files with 3 additions and 0 deletions

View File

@@ -147,6 +147,8 @@ app.cacheBuster = null;
Chat.prepareDOM();
app.reskin(data.config.bootswatchSkin);
translator.switchTimeagoLanguage(callback);
bootbox.setLocale(config.userLang);
$(window).trigger('action:app.updateHeader');
});
});
};

View File

@@ -483,6 +483,7 @@ authenticationController.logout = function (req, res, next) {
function (next) {
plugins.fireHook('static:user.loggedOut', { req: req, res: res, uid: req.uid }, next);
},
async.apply(middleware.autoLocale, req, res),
function () {
// Force session check for all connected socket.io clients with the same session id
sockets.in('sess_' + req.sessionID).emit('checkSession', 0);