summaryrefslogtreecommitdiff
path: root/plugins/OStatus
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-08-13 11:41:44 -0700
committerBrion Vibber <brion@pobox.com>2010-08-13 11:41:44 -0700
commit185f18024a208e0d981721e492a4ca54263e2520 (patch)
tree83024365cae5e289f449065a84cd5f4851c9aaf5 /plugins/OStatus
parent85693884994bda3067d2b9a46d279fd3a5c1c9f5 (diff)
Fixes for RSS subscriptions: accept posts with no ActivityStreams object-type set; be more liberal about accepting posts from feeds where the author info doesn't match (we'll post under the feed's profile and just not try to update the profile info).
Diffstat (limited to 'plugins/OStatus')
-rw-r--r--plugins/OStatus/classes/Ostatus_profile.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php
index 8f8eb773f..e76683a1c 100644
--- a/plugins/OStatus/classes/Ostatus_profile.php
+++ b/plugins/OStatus/classes/Ostatus_profile.php
@@ -456,8 +456,10 @@ class Ostatus_profile extends Memcached_DataObject
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.");
}
@@ -496,8 +498,11 @@ class Ostatus_profile extends Memcached_DataObject
} else if ($actor->id) {
// We have an ActivityStreams actor with an explicit ID that doesn't match the feed owner.
// This isn't what we expect from mainline OStatus person feeds!
- // Group feeds go down another path, with different validation.
- throw new Exception("Got an actor '{$actor->title}' ({$actor->id}) on single-user feed for {$this->uri}");
+ // Group feeds go down another path, with different validation...
+ // Most likely this is a plain ol' blog feed of some kind which
+ // doesn't match our expectations. We'll take the entry, but ignore
+ // the <author> info.
+ common_log(LOG_WARNING, "Got an actor '{$actor->title}' ({$actor->id}) on single-user feed for {$this->uri}");
} else {
// Plain <author> without ActivityStreams actor info.
// We'll just ignore this info for now and save the update under the feed's identity.