X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FApi%2FMastodon%2FStatuses%2FUnmute.php;h=e54380dbe59754a2f51967daa907534b72c688fd;hb=7486ebdc10715b7204b70ce262052d28cb61c69e;hp=511ae15407a29e208b9d097b30c21703638fda5c;hpb=7f846f153d6abf8ed4c0f9a5b81bd45a6ac8e4a2;p=friendica.git diff --git a/src/Module/Api/Mastodon/Statuses/Unmute.php b/src/Module/Api/Mastodon/Statuses/Unmute.php index 511ae15407..e54380dbe5 100644 --- a/src/Module/Api/Mastodon/Statuses/Unmute.php +++ b/src/Module/Api/Mastodon/Statuses/Unmute.php @@ -39,7 +39,7 @@ class Unmute extends BaseApi $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]]); @@ -48,7 +48,7 @@ class Unmute extends BaseApi } 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);