X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapidirectmessagenew.php;h=44e205ebb04a801c1831a8e57238da358cc1d070;hb=b5cfcba4712809cb17eabba299ce5ff04f4d7d70;hp=b9ac92d77bfc01bb91f87ec67ddde184b48f8347;hpb=f4459dfedcdea2f2a6078bedf9530deb45b6d52c;p=quix0rs-gnu-social.git diff --git a/actions/apidirectmessagenew.php b/actions/apidirectmessagenew.php index b9ac92d77b..44e205ebb0 100644 --- a/actions/apidirectmessagenew.php +++ b/actions/apidirectmessagenew.php @@ -52,7 +52,6 @@ require_once INSTALLDIR . '/lib/apiauth.php'; class ApiDirectMessageNewAction extends ApiAuthAction { - var $source = null; var $other = null; var $content = null; @@ -76,13 +75,6 @@ class ApiDirectMessageNewAction extends ApiAuthAction return; } - $this->source = $this->trimmed('source'); // Not supported by Twitter. - - $reserved_sources = array('web', 'omb', 'mail', 'xmpp', 'api'); - if (empty($this->source) || in_array($this->source, $reserved_sources)) { - $source = 'api'; - } - $this->content = $this->trimmed('text'); $this->user = $this->auth_user; @@ -114,6 +106,7 @@ class ApiDirectMessageNewAction extends ApiAuthAction if ($_SERVER['REQUEST_METHOD'] != 'POST') { $this->clientError( + // TRANS: Client error. POST is a HTTP command. It should not be translated. _('This method requires a POST.'), 400, $this->format