diff --git a/lib/activityobject.php b/lib/activityobject.php index 7fe5c4850c..9a6218de3a 100644 --- a/lib/activityobject.php +++ b/lib/activityobject.php @@ -195,15 +195,22 @@ class ActivityObject $this->type = self::PERSON; // XXX: is this fair? } - // start with - $title = ActivityUtils::childHtmlContent($element, self::TITLE); + // Start with - if (!empty($title)) { - $this->title = common_strip_html($title); + $this->title = ActivityUtils::childContent($element, PoCo::DISPLAYNAME, PoCo::NS); + + // try falling back to + + if (empty($this->title)) { + $title = ActivityUtils::childHtmlContent($element, self::TITLE); + + if (!empty($title)) { + $this->title = common_strip_html($title); + } } - // fall back to + // fall back to as a last resort if (empty($this->title)) { $this->title = $this->_childContent($element, self::NAME);