Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
persona-non-google
Commits
5a175f81
Commit
5a175f81
authored
Aug 26, 2021
by
Barış Soner Uşaklı
Browse files
fix: #500, dont load loggedInUser if quickreply isnt enabled
parent
41e4cfb8
Changes
1
Hide whitespace changes
Inline
Side-by-side
library.js
View file @
5a175f81
...
@@ -68,18 +68,22 @@ function renderAdmin(req, res, next) {
...
@@ -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
;
};
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment