diff --git a/src/controllers/accounts/chats.js b/src/controllers/accounts/chats.js index 221e1f5fae..d8555967df 100644 --- a/src/controllers/accounts/chats.js +++ b/src/controllers/accounts/chats.js @@ -20,7 +20,7 @@ chatsController.get = async function (req, res, next) { } const canChat = await privileges.global.can('chat', req.uid); if (!canChat) { - return next(new Error('[[error:no-privileges]]')); + return helpers.notAllowed(req, res, '[[error:no-privileges]]'); } const payload = {