$uid = self::getCurrentUserID();
if (empty($this->parameters['id'])) {
- DI::mstdnError()->UnprocessableEntity();
+ $this->logErrorAndJsonExit(422, $this->errorFactory->UnprocessableEntity());
}
$item = Post::selectOriginalForUser($uid, ['uri-id', 'gravity'], ['uri-id' => $this->parameters['id'], 'uid' => [$uid, 0]]);
}
if ($item['gravity'] != Item::GRAVITY_PARENT) {
- DI::mstdnError()->UnprocessableEntity(DI::l10n()->t('Only starting posts can be unmuted'));
+ $this->logErrorAndJsonExit(422, $this->errorFactory->UnprocessableEntity($this->t('Only starting posts can be unmuted')));
}
Post\ThreadUser::setIgnored($item['uri-id'], $uid, false);