uid fixes

This commit is contained in:
Barış Soner Uşaklı
2018-11-17 22:31:39 -05:00
parent c0a75d735b
commit e17c4b2766
16 changed files with 33 additions and 39 deletions

View File

@@ -381,7 +381,7 @@ SocketModules.chats.getRecentChats = function (socket, data, callback) {
};
SocketModules.chats.hasPrivateChat = function (socket, uid, callback) {
if (!socket.uid || !uid) {
if (socket.uid <= 0 || uid <= 0) {
return callback(new Error('[[error:invalid-data]]'));
}
Messaging.hasPrivateChat(socket.uid, uid, callback);