mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +02:00
Fetch the hub adress while parsing OStatus messages.
This commit is contained in:
parent
cb0351dba0
commit
81b609562e
2 changed files with 10 additions and 1 deletions
|
@ -84,6 +84,15 @@ function ostatus_import($xml,$importer,&$contact, &$hub) {
|
|||
$xpath->registerNamespace('ostatus', "http://ostatus.org/schema/1.0");
|
||||
$xpath->registerNamespace('statusnet', "http://status.net/schema/api/1/");
|
||||
|
||||
$gub = "";
|
||||
$hub_attributes = $xpath->query("/atom:feed/atom:link[@rel='hub']")->item(0)->attributes;
|
||||
if (is_object($hub_attributes))
|
||||
foreach($hub_attributes AS $hub_attribute)
|
||||
if ($hub_attribute->name == "href") {
|
||||
$hub = $hub_attribute->textContent;
|
||||
logger("Found hub ".$hub, LOGGER_DEBUG);
|
||||
}
|
||||
|
||||
$header = array();
|
||||
$header["uid"] = $importer["uid"];
|
||||
$header["network"] = NETWORK_OSTATUS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue