]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
ignore unrecognized object types
authorEvan Prodromou <evan@status.net>
Mon, 22 Mar 2010 12:17:14 +0000 (08:17 -0400)
committerEvan Prodromou <evan@status.net>
Mon, 22 Mar 2010 12:17:14 +0000 (08:17 -0400)
plugins/OStatus/classes/Ostatus_profile.php

index e33509c47146a284aca9d55cb310e58f1846e962..0eb5b8b82a1e509c7f77412096f1a86922467b3b 100644 (file)
@@ -442,6 +442,17 @@ class Ostatus_profile extends Memcached_DataObject
     {
         $activity = new Activity($entry, $feed);
 
+        switch ($activity->object->type) {
+        case ActivityObject::ARTICLE:
+        case ActivityObject::BLOGENTRY:
+        case ActivityObject::NOTE:
+        case ActivityObject::STATUS:
+        case ActivityObject::COMMENT:
+            break;
+        default:
+            throw new ClientException("Can't handle that kind of post.");
+        }
+
         if ($activity->verb == ActivityVerb::POST) {
             $this->processPost($activity, $source);
         } else {