X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapistatusesretweet.php;h=9aa33748544ec5c978453701aacba6265dd20a85;hb=67db18d30b9c1a8aa5d03bae38839e4294974d9b;hp=fc71d2274332625e6fa46713b5dfc42dad714eac;hpb=a3660fbea46be4d9408cd0f824166a75b8c865ab;p=quix0rs-gnu-social.git diff --git a/actions/apistatusesretweet.php b/actions/apistatusesretweet.php index fc71d22743..9aa3374854 100644 --- a/actions/apistatusesretweet.php +++ b/actions/apistatusesretweet.php @@ -72,15 +72,15 @@ class ApiStatusesRetweetAction extends ApiAuthAction $this->original = Notice::staticGet('id', $id); if (empty($this->original)) { - $this->clientError(_('No such notice'), + $this->clientError(_('No such notice.'), 400, $this->format); return false; } $this->user = $this->auth_user; - if ($this->user->id == $notice->profile_id) { - $this->clientError(_('Cannot repeat your own notice')); + if ($this->user->id == $this->original->profile_id) { + $this->clientError(_('Cannot repeat your own notice.'), 400, $this->format); return false; } @@ -88,7 +88,7 @@ class ApiStatusesRetweetAction extends ApiAuthAction $profile = $this->user->getProfile(); if ($profile->hasRepeated($id)) { - $this->clientError(_('Already repeated that notice'), + $this->clientError(_('Already repeated that notice.'), 400, $this->format); return false; } @@ -112,7 +112,7 @@ class ApiStatusesRetweetAction extends ApiAuthAction $repeat = $this->original->repeat($this->user->id, $this->source); - common_broadcast_notice($repeat); + $this->showNotice($repeat); }