Node.js based forum software built for the modern web
fix: return early for guests/spiders
Barış Soner Uşaklı8d56e097a584
diff --git a/src/messaging/index.js b/src/messaging/index.jsindex ccedd47e81..7a2cd617a6 100644--- a/src/messaging/index.js+++ b/src/messaging/index.js@@ -417,7 +417,8 @@ async function checkReputation(uid) {}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;}