X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapidirectmessage.php;h=4e2ec5eb08d88286fde2078788fb6f6f9e7c3833;hb=255ba42ef120a3ee0ac21c0c639730d8317b7e79;hp=53da9e0c68a297195c74c6b33eee1c8a5648539a;hpb=714d920faea302b55857cc3bec4e9e6160ea136a;p=quix0rs-gnu-social.git diff --git a/actions/apidirectmessage.php b/actions/apidirectmessage.php index 53da9e0c68..4e2ec5eb08 100644 --- a/actions/apidirectmessage.php +++ b/actions/apidirectmessage.php @@ -74,6 +74,7 @@ class ApiDirectMessageAction extends ApiAuthAction $this->user = $this->auth_user; if (empty($this->user)) { + // TRANS: Client error given when a user was not found (404). $this->clientError(_('No such user.'), 404, $this->format); return; } @@ -86,10 +87,12 @@ class ApiDirectMessageAction extends ApiAuthAction // Action was called by /api/direct_messages/sent.format $this->title = sprintf( + // TRANS: %s is a user nickname. _("Direct messages from %s"), $this->user->nickname ); $this->subtitle = sprintf( + // TRANS: %s is a user nickname. _("All the direct messages sent from %s"), $this->user->nickname ); @@ -98,10 +101,12 @@ class ApiDirectMessageAction extends ApiAuthAction $this->id = "tag:$taguribase:SentDirectMessages:" . $this->user->id; } else { $this->title = sprintf( + // TRANS: %s is a user nickname. _("Direct messages to %s"), $this->user->nickname ); $this->subtitle = sprintf( + // TRANS: %s is a user nickname. _("All the direct messages sent to %s"), $this->user->nickname ); @@ -153,6 +158,7 @@ class ApiDirectMessageAction extends ApiAuthAction $this->showJsonDirectMessages(); break; default: + // TRANS: Client error given when an API method was not found (404). $this->clientError(_('API method not found.'), $code = 404); break; } @@ -232,7 +238,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); @@ -356,6 +363,7 @@ class ApiDirectMessageAction extends ApiAuthAction return '"' . implode( ':', array($this->arg('action'), + common_user_cache_hash($this->auth_user), common_language(), strtotime($this->messages[0]->created), strtotime($this->messages[$last]->created)