]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Add support for Atom entry when posting status
authorThomas Karpiniec <tk@1.21jiggawatts.net>
Sat, 4 Feb 2017 09:04:02 +0000 (20:04 +1100)
committerThomas Karpiniec <tk@1.21jiggawatts.net>
Sat, 4 Feb 2017 09:04:02 +0000 (20:04 +1100)
actions/apistatusesupdate.php
lib/router.php

index f2c70f5452c9d64d7e1f811ff4d7dca4b3c10a29..de00325494497d69fa8dacc4364d3d783b46abf1 100644 (file)
@@ -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);
             }
         }
     }
index cd464d841cdfdf37a1416f8288cf85bd5896a86c..ab6595b8f8a51b44bd12692f2ef261b4a512bd14 100644 (file)
@@ -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',