]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apistatusesupdate.php
Better test to see if uploaded media exists
[quix0rs-gnu-social.git] / actions / apistatusesupdate.php
index 7bc5d899ef96a57e5f0348c9758531509c97fd21..d5fc7c994589bec48bf6ddf7e83d66dace56a7f6 100644 (file)
@@ -252,7 +252,7 @@ class ApiStatusesUpdateAction extends ApiAuthAction
                 $this->clientError($e->getMessage(), $e->getCode());
             }
 
-            if (isset($upload)) {
+            if ($upload instanceof MediaFile) {
                 $this->status .= ' ' . $upload->shortUrl();
 
                 /* Do not call shortenlinks until the whole notice has been build */
@@ -336,7 +336,7 @@ class ApiStatusesUpdateAction extends ApiAuthAction
      */
     function supported($cmd)
     {
-        static $cmdlist = array('MessageCommand', 'SubCommand', 'UnsubCommand',
+        static $cmdlist = array('SubCommand', 'UnsubCommand',
             'OnCommand', 'OffCommand', 'JoinCommand', 'LeaveCommand');
 
         $supported = null;