Make Mastodon retweets parse correctly.

This commit is contained in:
Roger Braun 2016-12-04 16:20:38 +01:00 committed by Mikael Nordfeldth
parent 8c6c6039a2
commit c741d1a52a

View File

@ -180,7 +180,7 @@ class Activity
foreach ($objectEls as $objectEl) { foreach ($objectEls as $objectEl) {
// Special case for embedded activities // Special case for embedded activities
$objectType = ActivityUtils::childContent($objectEl, self::OBJECTTYPE, self::SPEC); $objectType = ActivityUtils::childContent($objectEl, self::OBJECTTYPE, self::SPEC);
if (!empty($objectType) && $objectType == ActivityObject::ACTIVITY) { if ((!empty($objectType) && $objectType == ActivityObject::ACTIVITY) || $this->verb == ActivityVerb::SHARE) {
$this->objects[] = new Activity($objectEl); $this->objects[] = new Activity($objectEl);
} else { } else {
$this->objects[] = new ActivityObject($objectEl); $this->objects[] = new ActivityObject($objectEl);