fix: return early for guests/spiders

they cant have private chats
This commit is contained in:
Barış Soner Uşaklı
2024-06-08 20:50:46 -04:00
parent 2d86552b85
commit 8d56e097a5

View File

@@ -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;
}