]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apistatusesretweet.php
Fix undefined variable in showgroup
[quix0rs-gnu-social.git] / actions / apistatusesretweet.php
index 2bc9092ba6f42aa02313a03fbf904d52e5136019..4832da1823d6243d49a1122a144d4ad9607c5af1 100644 (file)
@@ -78,42 +78,6 @@ class ApiStatusesRetweetAction extends ApiAuthAction
 
         $this->user = $this->auth_user;
 
-        if ($this->user->id == $this->original->profile_id) {
-            // TRANS: Client error displayed trying to repeat an own notice through the API.
-            $this->clientError(_('Cannot repeat your own notice.'),
-                               400, $this->format);
-            return false;
-        }
-
-        // Is it OK to repeat that notice (general enough scope)?
-
-        if ($this->original->scope != Notice::SITE_SCOPE &&
-            $this->original->scope != Notice::PUBLIC_SCOPE) {
-            $this->clientError(_('You may not repeat a private notice.'),
-                               403,
-                               $this->format);
-            return false;
-        }
-
-        $profile = $this->user->getProfile();
-
-        // Can the profile actually see that notice?
-
-        if (!$this->original->inScope($profile)) {
-            $this->clientError(_('No access to that notice.'),
-                               403,
-                               $this->format);
-            return false;
-        }
-
-        if ($profile->hasRepeated($id)) {
-            // TRANS: Client error displayed trying to re-repeat a notice through the API.
-            $this->clientError(_('Already repeated that notice.'),
-                               400, $this->format);
-            return false;
-        }
-
-
         return true;
     }