]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/WebFinger/lib/webfingerresource/notice.php
Notice metadata for WebFinger. Not sure if implemented properly.
[quix0rs-gnu-social.git] / plugins / WebFinger / lib / webfingerresource / notice.php
index 9510a690f75f35dc3e54c5a9447b76ed5d938f21..b967bd9e1c15ff000b516ad80de8635392e185b9 100644 (file)
@@ -19,9 +19,19 @@ class WebFingerResource_Notice extends WebFingerResource
 
     public function updateXRD(XML_XRD $xrd)
     {
-        parent::updateXRD($xrd);
+        if (Event::handle('StartWebFingerNoticeLinks', array($xrd, $this->object))) {
+            $xrd->links[] = new XML_XRD_Element_Link('alternate',
+                                    common_local_url('ApiStatusesShow',
+                                        array('id'=>$this->object->id,
+                                              'format'=>'atom')),
+                                    'application/atom+xml');
 
-        // TODO: Add atom and json representation links here
-        // TODO: Add Salmon/callback links and stuff here
+            $xrd->links[] = new XML_XRD_Element_Link('alternate',
+                                    common_local_url('ApiStatusesShow',
+                                        array('id'=>$this->object->id,
+                                              'format'=>'json')),
+                                    'application/json');
+            Event::handle('EndWebFingerNoticeLinks', array($xrd, $this->object));
+        }
     }
 }