|
|
@ -68,18 +68,22 @@ function renderAdmin(req, res, next) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
library.addUserToTopic = async function (hookData) {
|
|
|
|
library.addUserToTopic = async function (hookData) {
|
|
|
|
if (hookData.req.user) {
|
|
|
|
const settings = await meta.settings.get('persona');
|
|
|
|
const userData = await user.getUserData(hookData.req.user.uid);
|
|
|
|
if (settings.enableQuickReply === 'on') {
|
|
|
|
hookData.templateData.loggedInUser = userData;
|
|
|
|
if (hookData.req.user) {
|
|
|
|
} else {
|
|
|
|
const userData = await user.getUserData(hookData.req.user.uid);
|
|
|
|
hookData.templateData.loggedInUser = {
|
|
|
|
hookData.templateData.loggedInUser = userData;
|
|
|
|
uid: 0,
|
|
|
|
} else {
|
|
|
|
username: '[[global:guest]]',
|
|
|
|
hookData.templateData.loggedInUser = {
|
|
|
|
picture: user.getDefaultAvatar(),
|
|
|
|
uid: 0,
|
|
|
|
'icon:text': '?',
|
|
|
|
username: '[[global:guest]]',
|
|
|
|
'icon:bgColor': '#aaa',
|
|
|
|
picture: user.getDefaultAvatar(),
|
|
|
|
};
|
|
|
|
'icon:text': '?',
|
|
|
|
|
|
|
|
'icon:bgColor': '#aaa',
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return hookData;
|
|
|
|
return hookData;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|