diff options
author | Evan Prodromou <evan@status.net> | 2010-03-27 22:44:10 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-03-27 22:44:10 -0400 |
commit | 29566c5d4b17eb42d3f69bb6b8e74259ee4218fb (patch) | |
tree | a16631a67f7c2f7bbb4bf51c9330459c1cd42952 /lib/activity.php | |
parent | 8a9e664014479487b77e0841584310a8b820890e (diff) |
move check for bad IDs from activityobject to activity and make simpler
Diffstat (limited to 'lib/activity.php')
-rw-r--r-- | lib/activity.php | 11 |
1 files changed, 11 insertions, 0 deletions
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)) { |