Add rel="avatar" to img links in <activity:actor> stanzas

This commit is contained in:
Zach Copley 2010-02-16 11:32:10 -08:00
parent 201110ffaa
commit eea52c708b

View File

@ -807,8 +807,6 @@ class Profile extends Memcached_DataObject
null, null,
'http://activitystrea.ms/schema/1.0/person' 'http://activitystrea.ms/schema/1.0/person'
); );
// FIXME: this presupposes a local user -- not necessarily the case
// instead use User::uri or Remote_profile::uri or Ostatus_profile::homeuri
$xs->element( $xs->element(
'id', 'id',
null, null,
@ -824,6 +822,7 @@ class Profile extends Memcached_DataObject
$xs->element( $xs->element(
'link', array( 'link', array(
'type' => empty($avatar) ? 'image/png' : $avatar->mediatype, 'type' => empty($avatar) ? 'image/png' : $avatar->mediatype,
'rel' => 'avatar',
'href' => empty($avatar) 'href' => empty($avatar)
? Avatar::defaultImage(AVATAR_PROFILE_SIZE) ? Avatar::defaultImage(AVATAR_PROFILE_SIZE)
: $avatar->displayUrl() : $avatar->displayUrl()