Compatibility with pleroma added
This commit is contained in:
parent
c9daecb80d
commit
51dca9b034
3 changed files with 16 additions and 1 deletions
|
@ -108,6 +108,14 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
|
||||||
if ($value != "") {
|
if ($value != "") {
|
||||||
$author["author-about"] = $value;
|
$author["author-about"] = $value;
|
||||||
}
|
}
|
||||||
|
$avatar = $xpath->evaluate("atom:author/atom:link[@rel='avatar']")->item(0)->attributes;
|
||||||
|
if (is_object($avatar)) {
|
||||||
|
foreach ($avatar AS $attributes) {
|
||||||
|
if ($attributes->name == "href") {
|
||||||
|
$author["author-avatar"] = $attributes->textContent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$author["edited"] = $author["created"] = $xpath->query('/atom:feed/atom:updated/text()')->item(0)->nodeValue;
|
$author["edited"] = $author["created"] = $xpath->query('/atom:feed/atom:updated/text()')->item(0)->nodeValue;
|
||||||
|
|
|
@ -101,7 +101,7 @@ class ostatus {
|
||||||
$width = $attributes->textContent;
|
$width = $attributes->textContent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (($width > 0) && ($href != "")) {
|
if ($href != "") {
|
||||||
$avatarlist[$width] = $href;
|
$avatarlist[$width] = $href;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1201,6 +1201,7 @@ class Probe {
|
||||||
if (!$feed_data) {
|
if (!$feed_data) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($feed_data["header"]["author-name"] != "") {
|
if ($feed_data["header"]["author-name"] != "") {
|
||||||
$data["name"] = $feed_data["header"]["author-name"];
|
$data["name"] = $feed_data["header"]["author-name"];
|
||||||
}
|
}
|
||||||
|
@ -1224,6 +1225,12 @@ class Probe {
|
||||||
if ($feed_data["header"]["author-link"] != "") {
|
if ($feed_data["header"]["author-link"] != "") {
|
||||||
$data["url"] = $feed_data["header"]["author-link"];
|
$data["url"] = $feed_data["header"]["author-link"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (($data['poll'] == $data['url']) && ($data["alias"] != '')) {
|
||||||
|
$data['url'] = $data["alias"];
|
||||||
|
$data["alias"] = '';
|
||||||
|
}
|
||||||
|
|
||||||
/// @todo Fetch location and "about" from the feed as well
|
/// @todo Fetch location and "about" from the feed as well
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue