mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-27 17:11:14 +01:00
fix: dont load chat rooms for quests/spiders
This commit is contained in:
@@ -130,7 +130,7 @@ module.exports = function (middleware) {
|
|||||||
return await user.getUserData(req.uid);
|
return await user.getUserData(req.uid);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
uid: 0,
|
uid: req.uid === -1 ? -1 : 0,
|
||||||
username: '[[global:guest]]',
|
username: '[[global:guest]]',
|
||||||
picture: user.getDefaultAvatar(),
|
picture: user.getDefaultAvatar(),
|
||||||
'icon:text': '?',
|
'icon:text': '?',
|
||||||
@@ -184,7 +184,7 @@ module.exports = function (middleware) {
|
|||||||
timeagoCode: languages.userTimeagoCode(res.locals.config.userLang),
|
timeagoCode: languages.userTimeagoCode(res.locals.config.userLang),
|
||||||
browserTitle: translator.translate(controllersHelpers.buildTitle(title)),
|
browserTitle: translator.translate(controllersHelpers.buildTitle(title)),
|
||||||
navigation: navigation.get(req.uid),
|
navigation: navigation.get(req.uid),
|
||||||
roomIds: db.getSortedSetRevRange(`uid:${req.uid}:chat:rooms`, 0, 0),
|
roomIds: req.uid > 0 ? db.getSortedSetRevRange(`uid:${req.uid}:chat:rooms`, 0, 0) : [],
|
||||||
});
|
});
|
||||||
|
|
||||||
const unreadData = {
|
const unreadData = {
|
||||||
|
|||||||
Reference in New Issue
Block a user