|
|
|
@ -808,8 +808,8 @@ class UserService extends SiteService {
|
|
|
|
|
await User.updateOne({ _id: user._id }, { $unset: { 'header': '' } });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async blockUser (user, blockedUser) {
|
|
|
|
|
if (user._id.equals(blockedUser._id)) {
|
|
|
|
|
async blockUser (userId, blockedUserId) {
|
|
|
|
|
if (userId.equals(blockedUserId)) {
|
|
|
|
|
throw new SiteError(406, "You can't block yourself");
|
|
|
|
|
}
|
|
|
|
|
await UserBlock.updateOne(
|
|
|
|
|