X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapidirectmessagenew.php;h=65d065648ff0337483a3fd5add842546b2133230;hb=6d8e01ad13dd9bc9e149f43a1eb88671d4737f4d;hp=fed6acc30e6ed4ecb55617b05a98fd6e3a028e62;hpb=221b779e88e51b70a2c3509798154c461203e636;p=quix0rs-gnu-social.git diff --git a/actions/apidirectmessagenew.php b/actions/apidirectmessagenew.php index fed6acc30e..65d065648f 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($thtis->source) || in_array($this->source, $reserved_sources)) { - $source = 'api'; - } - $this->content = $this->trimmed('text'); $this->user = $this->auth_user; @@ -175,7 +167,7 @@ class ApiDirectMessageNewAction extends ApiAuthAction return; } - mail_notify_message($message, $this->user, $this->other); + $message->notify(); if ($this->format == 'xml') { $this->showSingleXmlDirectMessage($message);