From: Evan Prodromou Date: Fri, 13 Aug 2010 21:35:49 +0000 (-0700) Subject: Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=926c77246bb168097b3f937b5cc22ee9721b83c9;p=quix0rs-gnu-social.git Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x Conflicts: plugins/OStatus/classes/Ostatus_profile.php --- 926c77246bb168097b3f937b5cc22ee9721b83c9 diff --cc plugins/OStatus/classes/Ostatus_profile.php index 1fae468f66,e76683a1c2..cc4307b14f --- a/plugins/OStatus/classes/Ostatus_profile.php +++ b/plugins/OStatus/classes/Ostatus_profile.php @@@ -450,26 -449,24 +450,27 @@@ class Ostatus_profile extends Memcached { $activity = new Activity($entry, $feed); - // @todo process all activity objects - switch ($activity->objects[0]->type) { - case ActivityObject::ARTICLE: - case ActivityObject::BLOGENTRY: - case ActivityObject::NOTE: - case ActivityObject::STATUS: - case ActivityObject::COMMENT: - case null: // Unspecified type is assumed to be a blog post; as we get from RSS. - break; - default: - common_log(LOG_INFO, "Aborting processing for unrecognized activity type " . $activity->objects[0]->type); - throw new ClientException("Can't handle that kind of post."); - } + if (Event::handle('StartHandleFeedEntry', array($activity))) { + + // @todo process all activity objects + switch ($activity->objects[0]->type) { + case ActivityObject::ARTICLE: + case ActivityObject::BLOGENTRY: + case ActivityObject::NOTE: + case ActivityObject::STATUS: + case ActivityObject::COMMENT: ++ case null: + if ($activity->verb == ActivityVerb::POST) { + $this->processPost($activity, $source); + } else { + common_log(LOG_INFO, "Ignoring activity with unrecognized verb $activity->verb"); + } + break; + default: + throw new ClientException("Can't handle that kind of post."); + } - if ($activity->verb == ActivityVerb::POST) { - $this->processPost($activity, $source); - } else { - common_log(LOG_INFO, "Ignoring activity with unrecognized verb $activity->verb"); + Event::handle('EndHandleFeedEntry', array($activity)); } }