X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapidirectmessage.php;h=7a0f46274cbde24478e222da8bdcbbce2bd50f1a;hb=a9bb1c75282a642d34b88fee2a7ca31ab7c2a0fb;hp=a21fe86d20269268faf5fb3d1c4cc89b9a84990b;hpb=4e9ec0d0e1aeb43b432f4692b4819beb9408ad3b;p=quix0rs-gnu-social.git diff --git a/actions/apidirectmessage.php b/actions/apidirectmessage.php index a21fe86d20..7a0f46274c 100644 --- a/actions/apidirectmessage.php +++ b/actions/apidirectmessage.php @@ -74,12 +74,12 @@ class ApiDirectMessageAction 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; } $server = common_root_url(); - $taguribase = common_config('integration', 'taguri'); + $taguribase = TagURI::base(); if ($this->arg('sent')) { @@ -153,7 +153,7 @@ class ApiDirectMessageAction extends ApiAuthAction $this->showJsonDirectMessages(); break; default: - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); break; } } @@ -182,11 +182,6 @@ class ApiDirectMessageAction extends ApiAuthAction $message->whereAdd('id > ' . $this->since_id); } - if (!empty($since)) { - $d = date('Y-m-d H:i:s', $this->since); - $message->whereAdd("created > '$d'"); - } - $message->orderBy('created DESC, id DESC'); $message->limit((($this->page - 1) * $this->count), $this->count); $message->find(); @@ -237,7 +232,8 @@ class ApiDirectMessageAction extends ApiAuthAction function showXmlDirectMessages() { $this->initDocument('xml'); - $this->elementStart('direct-messages', array('type' => 'array')); + $this->elementStart('direct-messages', array('type' => 'array', + 'xmlns:statusnet' => 'http://status.net/schema/api/1/')); foreach ($this->messages as $m) { $dm_array = $this->directMessageArray($m);