]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Favorite/actions/favor.php
Move AlreadyFulfilled check to Fave::addNew
[quix0rs-gnu-social.git] / plugins / Favorite / actions / favor.php
index f6590784509348ae605737699360c295ee5e1764..0d52f7796176efa01269d14eed7b11cce74df608 100644 (file)
@@ -61,12 +61,7 @@ class FavorAction extends FormAction
 
     protected function doPost()
     {
-        if (Fave::existsForProfile($this->target, $this->scoped)) {
-            // TRANS: Client error displayed when trying to mark a notice as favorite that already is a favorite.
-            throw new AlreadyFulfilledException(_('You have already favorited this!'));
-        }
-
-        // throws exception on failure
+        // throws exception on failure, might be an AlreadyFulfilledException
         $stored = Fave::addNew($this->scoped, $this->target);
 
         // TRANS: Message when a favor action has been taken for a notice.