This commit is contained in:
Barış Soner Uşaklı
2016-10-22 10:22:05 +03:00
parent f2275ca261
commit cbd936c547
3 changed files with 13 additions and 1 deletions

View File

@@ -367,6 +367,10 @@ var userNotifications = require('./user/notifications');
return callback(new Error('[[error:chat-disabled]]'));
}
if (parseInt(uid, 10) === parseInt(toUid, 10)) {
return callback(new Error('[[error:cant-chat-with-yourself'));
}
async.waterfall([
function (next) {
user.exists(toUid, next);