mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-01 03:28:16 +02:00
closes #2619
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user