summaryrefslogtreecommitdiff
path: root/plugins/OStatus
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-03-21 07:37:58 -0500
committerEvan Prodromou <evan@status.net>2010-03-21 07:37:58 -0500
commit0f1f7ab79bad2392e10f2bc0d310f5f77b05c531 (patch)
tree3b019667c2248ea3a9b05ae3382960cab5f360bb /plugins/OStatus
parentc2afdfbbf5534474d0c5289e7916e77a612aadfd (diff)
only use Posterous author data if it matches the profile URL
Diffstat (limited to 'plugins/OStatus')
-rw-r--r--plugins/OStatus/classes/Ostatus_profile.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php
index 1c110ab24..e48ed6ee8 100644
--- a/plugins/OStatus/classes/Ostatus_profile.php
+++ b/plugins/OStatus/classes/Ostatus_profile.php
@@ -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);
+ }
}
}