fix: #7087, server-side protection against guest blocks

This commit is contained in:
Julian Lam
2018-12-10 14:14:11 -05:00
parent 6c312fa253
commit 33d4956b76
3 changed files with 22 additions and 12 deletions

View File

@@ -220,10 +220,6 @@ module.exports = function (SocketUser) {
},
function (results, next) {
isBlocked = results.is;
if (!results.can && !isBlocked) {
return next(new Error('[[error:cannot-block-privileged]]'));
}
user.blocks[isBlocked ? 'remove' : 'add'](data.blockeeUid, data.blockerUid, next);
},
], function (err) {