give preference to rel="photo" (per latest ActivityStreams spec), but still support rel="avatar" for compat
This commit is contained in:
parent
85cf90cf0f
commit
c4f89b06f1
@ -681,9 +681,16 @@ class ActivityObject
|
|||||||
if ($this->type == self::PERSON || $this->type == self::GROUP) {
|
if ($this->type == self::PERSON || $this->type == self::GROUP) {
|
||||||
$this->displayName = $this->title;
|
$this->displayName = $this->title;
|
||||||
|
|
||||||
$avatars = ActivityUtils::getLinks($element, 'avatar');
|
$photos = ActivityUtils::getLinks($element, 'photo');
|
||||||
foreach ($avatars as $link) {
|
if (count($photos)) {
|
||||||
$this->avatarLinks[] = new AvatarLink($link);
|
foreach ($photos as $link) {
|
||||||
|
$this->avatarLinks[] = new AvatarLink($link);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$avatars = ActivityUtils::getLinks($element, 'avatar');
|
||||||
|
foreach ($avatars as $link) {
|
||||||
|
$this->avatarLinks[] = new AvatarLink($link);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->poco = new PoCo($element);
|
$this->poco = new PoCo($element);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user