v1.18.x
Barış Soner Uşaklı 10 years ago
parent 3293436867
commit 3f31098144

@ -521,9 +521,10 @@ accountsController.getChats = function(req, res, next) {
async.waterfall([
async.apply(user.getUidByUserslug, req.params.userslug),
function(toUid, next) {
if (!toUid) {
if (!toUid || parseInt(toUid, 10) === parseInt(req.user.uid, 10)) {
return helpers.notFound(req, res);
}
async.parallel({
toUser: async.apply(user.getUserFields, toUid, ['uid', 'username']),
messages: async.apply(messaging.getMessages, req.user.uid, toUid, 'recent', false),

Loading…
Cancel
Save