Commit 0f1f7ab7 authored by Evan Prodromou's avatar Evan Prodromou

only use Posterous author data if it matches the profile URL

parent c2afdfbb
......@@ -903,7 +903,13 @@ class Ostatus_profile extends Memcached_DataObject
$authorEl = ActivityUtils::child($item, ActivityObject::AUTHOR, ActivityObject::POSTEROUS);
if (!empty($authorEl)) {
$obj = ActivityObject::fromPosterousAuthor($authorEl);
return self::ensureActivityObjectProfile($obj, $hints);
// 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);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment