diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php index efb12a2dd3..1c110ab247 100644 --- a/plugins/OStatus/classes/Ostatus_profile.php +++ b/plugins/OStatus/classes/Ostatus_profile.php @@ -893,6 +893,20 @@ class Ostatus_profile extends Memcached_DataObject public static function ensureRssChannel($feedEl, $hints) { + // Special-case for Posterous. They have some nice metadata in their + // posterous:author elements. We should use them instead of the channel. + + $items = $feedEl->getElementsByTagName('item'); + + if ($items->length > 0) { + $item = $items->item(0); + $authorEl = ActivityUtils::child($item, ActivityObject::AUTHOR, ActivityObject::POSTEROUS); + if (!empty($authorEl)) { + $obj = ActivityObject::fromPosterousAuthor($authorEl); + return self::ensureActivityObjectProfile($obj, $hints); + } + } + // @fixme we should check whether this feed has elements // with different or elements, and... I dunno. // Do something about that.