Parse remote users' fullnames from PoCo::displayName elements
Try this first; use activity:subject->atom:title only as a fallback. The code that output activity:subject was removed 2013-10-08, and it it was deprecated for years before that....
This commit is contained in:
parent
d02f3c4648
commit
238095a719
@ -195,15 +195,22 @@ class ActivityObject
|
|||||||
$this->type = self::PERSON; // XXX: is this fair?
|
$this->type = self::PERSON; // XXX: is this fair?
|
||||||
}
|
}
|
||||||
|
|
||||||
// start with <atom:title>
|
|
||||||
|
|
||||||
|
// Start with <poco::displayName>
|
||||||
|
|
||||||
|
$this->title = ActivityUtils::childContent($element, PoCo::DISPLAYNAME, PoCo::NS);
|
||||||
|
|
||||||
|
// try falling back to <atom:title>
|
||||||
|
|
||||||
|
if (empty($this->title)) {
|
||||||
$title = ActivityUtils::childHtmlContent($element, self::TITLE);
|
$title = ActivityUtils::childHtmlContent($element, self::TITLE);
|
||||||
|
|
||||||
if (!empty($title)) {
|
if (!empty($title)) {
|
||||||
$this->title = common_strip_html($title);
|
$this->title = common_strip_html($title);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// fall back to <atom:name>
|
// fall back to <atom:name> as a last resort
|
||||||
|
|
||||||
if (empty($this->title)) {
|
if (empty($this->title)) {
|
||||||
$this->title = $this->_childContent($element, self::NAME);
|
$this->title = $this->_childContent($element, self::NAME);
|
||||||
|
Loading…
Reference in New Issue
Block a user