mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: return early for guests/spiders
they cant have private chats
This commit is contained in:
@@ -417,7 +417,8 @@ async function checkReputation(uid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Messaging.hasPrivateChat = async (uid, withUid) => {
|
Messaging.hasPrivateChat = async (uid, withUid) => {
|
||||||
if (parseInt(uid, 10) === parseInt(withUid, 10)) {
|
if (parseInt(uid, 10) === parseInt(withUid, 10) ||
|
||||||
|
parseInt(uid, 10) <= 0 || parseInt(withUid, 10) <= 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user