]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x
authorEvan Prodromou <evan@status.net>
Fri, 13 Aug 2010 21:35:49 +0000 (14:35 -0700)
committerEvan Prodromou <evan@status.net>
Fri, 13 Aug 2010 21:35:49 +0000 (14:35 -0700)
Conflicts:
plugins/OStatus/classes/Ostatus_profile.php

1  2 
plugins/OStatus/classes/Ostatus_profile.php

index 1fae468f66b10b66c144b97b3cc102bc17f800aa,e76683a1c28dfebd4cc2271cd94f08189142db3c..cc4307b14f119c625e56ee606d2207c5a134c925
@@@ -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));
          }
      }