From 29566c5d4b17eb42d3f69bb6b8e74259ee4218fb Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sat, 27 Mar 2010 22:44:10 -0400 Subject: move check for bad IDs from activityobject to activity and make simpler --- lib/activity.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/activity.php') diff --git a/lib/activity.php b/lib/activity.php index f9192c6b8..5d6230c6d 100644 --- a/lib/activity.php +++ b/lib/activity.php @@ -179,6 +179,17 @@ class Activity $this->actor = new ActivityObject($actorEl); + // Cliqset has bad actor IDs (just nickname of user). We + // work around it by getting the author data and using its + // id instead + + if (!preg_match('/^\w+:/', $this->actor->id)) { + $authorEl = ActivityUtils::child($entry, 'author'); + if (!empty($authorEl)) { + $authorObj = new ActivityObject($authorEl); + $this->actor->id = $authorObj->id; + } + } } else if (!empty($feed) && $subjectEl = $this->_child($feed, self::SUBJECT)) { -- cgit v1.2.3-54-g00ecf