More Activity-based reasoning for saveActivity in Notice

If we can, get the activity ID from the activity itself, instead of the
supplied $options array.
This commit is contained in:
Mikael Nordfeldth
2014-07-14 23:54:58 +02:00
parent 1ee79dc379
commit c96f0aa30f
3 changed files with 14 additions and 16 deletions

View File

@@ -244,6 +244,9 @@ class Activity
if (!empty($targetEl)) {
$this->target = new ActivityObject($targetEl);
} elseif (ActivityUtils::compareTypes($this->verb, array(ActivityVerb::FAVORITE))) {
// StatusNet didn't send a 'target' for their Favorite atom entries
$this->target = clone($this->objects[0]);
}
$this->summary = ActivityUtils::childContent($entry, 'summary');