DiscoveryHints gets microformats2 parsing abilities

This commit is contained in:
Mikael Nordfeldth
2014-06-23 21:41:06 +02:00
parent da04334028
commit c74dc15173
3 changed files with 37 additions and 151 deletions

View File

@@ -214,9 +214,12 @@ class LooseOstatusProfile extends Ostatus_profile
$hints = array('webfinger' => $addr);
$dhints = DiscoveryHints::fromXRD($xrd);
$hints = array_merge($hints, $dhints);
try {
$dHints = DiscoveryHints::fromXRD($xrd);
$hints = array_merge($hints, $xrdHints);
} catch (Exception $e) {
// No hints available from XRD
}
// If there's an Hcard, let's grab its info
if (array_key_exists('hcard', $hints)) {