summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-03-22 08:17:14 -0400
committerEvan Prodromou <evan@status.net>2010-03-22 08:17:14 -0400
commitedee1fc09e304616fbce4ad1d1dae6097655c4e7 (patch)
tree644c826d22065974f923137382292f8115b67d7c
parentfcb614d0eb1f98bf8704654ed06e1f9d9733d359 (diff)
ignore unrecognized object types
-rw-r--r--plugins/OStatus/classes/Ostatus_profile.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php
index e33509c47..0eb5b8b82 100644
--- a/plugins/OStatus/classes/Ostatus_profile.php
+++ b/plugins/OStatus/classes/Ostatus_profile.php
@@ -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 {