From 132b932ff3c613a15695995298f03d5f88ffe069 Mon Sep 17 00:00:00 2001 From: Thomas Karpiniec Date: Sat, 4 Feb 2017 20:04:02 +1100 Subject: [PATCH] Add support for Atom entry when posting status --- actions/apistatusesupdate.php | 4 +++- lib/router.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/actions/apistatusesupdate.php b/actions/apistatusesupdate.php index f2c70f5452..de00325494 100644 --- a/actions/apistatusesupdate.php +++ b/actions/apistatusesupdate.php @@ -46,7 +46,7 @@ /api/statuses/update.:format @par Formats (:format) - xml, json + xml, json, atom @par HTTP Method(s) POST @@ -339,6 +339,8 @@ class ApiStatusesUpdateAction extends ApiAuthAction $this->showSingleXmlStatus($this->notice); } elseif ($this->format == 'json') { $this->show_single_json_status($this->notice); + } elseif ($this->format == 'atom') { + $this->showSingleAtomStatus($this->notice); } } } diff --git a/lib/router.php b/lib/router.php index cd464d841c..ab6595b8f8 100644 --- a/lib/router.php +++ b/lib/router.php @@ -420,7 +420,7 @@ class Router $m->connect('api/statuses/update.:format', array('action' => 'ApiStatusesUpdate', - 'format' => '(xml|json)')); + 'format' => '(xml|json|atom)')); $m->connect('api/statuses/destroy/:id.:format', array('action' => 'ApiStatusesDestroy',