object])) { if ($this->object->isLocal()) { $xrd->links[] = new XML_XRD_Element_Link('alternate', common_local_url('ApiStatusesShow', ['id' => $this->object->id, 'format' => 'atom', ]), 'application/atom+xml'); $xrd->links[] = new XML_XRD_Element_Link('alternate', common_local_url('ApiStatusesShow', ['id' => $this->object->id, 'format' => 'json', ]), 'application/json'); } else { try { $xrd->links[] = new XML_XRD_Element_Link('alternate', $this->object->getUrl(), 'text/html'); } catch (InvalidUrlException $e) { // don't do a fallback in webfinger } } Event::handle('EndWebFingerNoticeLinks', [$xrd, $this->object]); } } }