X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapidirectmessagenew.php;h=b9ac92d77bfc01bb91f87ec67ddde184b48f8347;hb=8e06b932af93b8fbd66610c948bdde4fafd4f300;hp=fa6cafbe8d4a82849617264a70c3c5cb7a581b73;hpb=7021dd9341635090207a39ea8f74558e243c874f;p=quix0rs-gnu-social.git diff --git a/actions/apidirectmessagenew.php b/actions/apidirectmessagenew.php index fa6cafbe8d..b9ac92d77b 100644 --- a/actions/apidirectmessagenew.php +++ b/actions/apidirectmessagenew.php @@ -72,14 +72,14 @@ class ApiDirectMessageNewAction extends ApiAuthAction $this->user = $this->auth_user; if (empty($this->user)) { - $this->clientError(_('No such user!'), 404, $this->format); + $this->clientError(_('No such user.'), 404, $this->format); return; } $this->source = $this->trimmed('source'); // Not supported by Twitter. $reserved_sources = array('web', 'omb', 'mail', 'xmpp', 'api'); - if (empty($thtis->source) || in_array($this->source, $reserved_sources)) { + if (empty($this->source) || in_array($this->source, $reserved_sources)) { $source = 'api'; } @@ -157,7 +157,7 @@ class ApiDirectMessageNewAction extends ApiAuthAction // Note: sending msgs to yourself is allowed by Twitter $errmsg = 'Don\'t send a message to yourself; ' . - 'just say it to yourself quietly instead.' + 'just say it to yourself quietly instead.'; $this->clientError(_($errmsg), 403, $this->format); return; @@ -175,7 +175,7 @@ class ApiDirectMessageNewAction extends ApiAuthAction return; } - mail_notify_message($message, $this->user, $this->other); + $message->notify(); if ($this->format == 'xml') { $this->showSingleXmlDirectMessage($message);