only use Posterous author data if it matches the profile URL
This commit is contained in:
parent
c2afdfbbf5
commit
0f1f7ab79b
@ -903,9 +903,15 @@ class Ostatus_profile extends Memcached_DataObject
|
|||||||
$authorEl = ActivityUtils::child($item, ActivityObject::AUTHOR, ActivityObject::POSTEROUS);
|
$authorEl = ActivityUtils::child($item, ActivityObject::AUTHOR, ActivityObject::POSTEROUS);
|
||||||
if (!empty($authorEl)) {
|
if (!empty($authorEl)) {
|
||||||
$obj = ActivityObject::fromPosterousAuthor($authorEl);
|
$obj = ActivityObject::fromPosterousAuthor($authorEl);
|
||||||
|
// Posterous has multiple authors per feed, and multiple feeds
|
||||||
|
// per author. We check if this is the "main" feed for this author.
|
||||||
|
if (array_key_exists('profileurl', $hints) &&
|
||||||
|
!empty($obj->poco) &&
|
||||||
|
common_url_to_nickname($hints['profileurl']) == $obj->poco->preferredUsername) {
|
||||||
return self::ensureActivityObjectProfile($obj, $hints);
|
return self::ensureActivityObjectProfile($obj, $hints);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// @fixme we should check whether this feed has elements
|
// @fixme we should check whether this feed has elements
|
||||||
// with different <author> or <dc:creator> elements, and... I dunno.
|
// with different <author> or <dc:creator> elements, and... I dunno.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user