]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apifavoritecreate.php
Fix for "#foo !foo" in same notice failing during save, causing failout before distri...
[quix0rs-gnu-social.git] / actions / apifavoritecreate.php
index 43673977073abbb23dd93e7c337f37e3d2d884fa..00b6349b0a7a7fce85cd7f4dbed62816209b98ac 100644 (file)
@@ -96,7 +96,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction
 
         if (!in_array($this->format, array('xml', 'json'))) {
             $this->clientError(
-                _('API method not found!'),
+                _('API method not found.'),
                 404,
                 $this->format
             );
@@ -116,14 +116,14 @@ class ApiFavoriteCreateAction extends ApiAuthAction
 
         if ($this->user->hasFave($this->notice)) {
             $this->clientError(
-                _('This status is already a favorite!'),
+                _('This status is already a favorite.'),
                 403,
                 $this->format
             );
             return;
         }
 
-        $fave = Fave::addNew($this->user, $this->notice);
+        $fave = Fave::addNew($this->user->getProfile(), $this->notice);
 
         if (empty($fave)) {
             $this->clientError(