]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apidirectmessage.php
Using GNUSOCIAL_VERSION instead of STATUSNET_VERSION
[quix0rs-gnu-social.git] / actions / apidirectmessage.php
index e072e27b8319b925aee1296c6663a79e862cc381..e971a7d4eed9953434481dc2f324aa8def2694d1 100644 (file)
@@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
     exit(1);
 }
 
-require_once INSTALLDIR . '/lib/apiauth.php';
-
 /**
  * Show a list of direct messages from or to the authenticating user
  *
@@ -72,8 +70,7 @@ class ApiDirectMessageAction extends ApiAuthAction
 
         if (empty($this->user)) {
             // TRANS: Client error given when a user was not found (404).
-            $this->clientError(_('No such user.'), 404, $this->format);
-            return;
+            $this->clientError(_('No such user.'), 404);
         }
 
         $server   = common_root_url();
@@ -153,7 +150,7 @@ class ApiDirectMessageAction extends ApiAuthAction
             $this->showJsonDirectMessages();
             break;
         default:
-            // TRANS: Client error given when an API method was not found (404).
+            // TRANS: Client error displayed when coming across a non-supported API method.
             $this->clientError(_('API method not found.'), $code = 404);
             break;
         }