Atom output of ActivityObject now has html AND text
This commit is contained in:
parent
db363cdad9
commit
e1c9061735
@ -438,7 +438,7 @@ class ActivityObject
|
|||||||
$object->type = (empty($notice->object_type)) ? ActivityObject::NOTE : $notice->object_type;
|
$object->type = (empty($notice->object_type)) ? ActivityObject::NOTE : $notice->object_type;
|
||||||
|
|
||||||
$object->id = $notice->uri;
|
$object->id = $notice->uri;
|
||||||
$object->title = $notice->content;
|
$object->title = 'New ' . ActivityObject::canonicalType($notice->object_type);
|
||||||
$object->content = $notice->rendered;
|
$object->content = $notice->rendered;
|
||||||
$object->link = $notice->bestUrl();
|
$object->link = $notice->bestUrl();
|
||||||
|
|
||||||
@ -696,6 +696,11 @@ class ActivityObject
|
|||||||
|
|
||||||
if (!empty($this->content)) {
|
if (!empty($this->content)) {
|
||||||
// XXX: assuming HTML content here
|
// XXX: assuming HTML content here
|
||||||
|
$xo->element(
|
||||||
|
ActivityUtils::CONTENT,
|
||||||
|
array('type' => 'text'),
|
||||||
|
html_entity_decode(strip_tags($this->content), ENT_QUOTES, 'UTF-8')
|
||||||
|
);
|
||||||
$xo->element(
|
$xo->element(
|
||||||
ActivityUtils::CONTENT,
|
ActivityUtils::CONTENT,
|
||||||
array('type' => 'html'),
|
array('type' => 'html'),
|
||||||
@ -792,9 +797,6 @@ class ActivityObject
|
|||||||
|
|
||||||
// content (Add rendered version of the notice?)
|
// content (Add rendered version of the notice?)
|
||||||
|
|
||||||
// displayName
|
|
||||||
$object['displayName'] = $this->title;
|
|
||||||
|
|
||||||
// downstreamDuplicates
|
// downstreamDuplicates
|
||||||
|
|
||||||
// id
|
// id
|
||||||
@ -808,6 +810,9 @@ class ActivityObject
|
|||||||
if ($this->type == ActivityObject::PERSON
|
if ($this->type == ActivityObject::PERSON
|
||||||
|| $this->type == ActivityObject::GROUP) {
|
|| $this->type == ActivityObject::GROUP) {
|
||||||
|
|
||||||
|
// displayName
|
||||||
|
$object['displayName'] = $this->title;
|
||||||
|
|
||||||
// XXX: Not sure what the best avatar is to use for the
|
// XXX: Not sure what the best avatar is to use for the
|
||||||
// author's "image". For now, I'm using the large size.
|
// author's "image". For now, I'm using the large size.
|
||||||
|
|
||||||
@ -855,7 +860,7 @@ class ActivityObject
|
|||||||
// summary
|
// summary
|
||||||
$object['summary'] = $this->summary;
|
$object['summary'] = $this->summary;
|
||||||
|
|
||||||
// content
|
// content, usually rendered HTML
|
||||||
$object['content'] = $this->content;
|
$object['content'] = $this->content;
|
||||||
|
|
||||||
// published (probably don't need. Might be useful for repeats.)
|
// published (probably don't need. Might be useful for repeats.)
|
||||||
|
Loading…
Reference in New Issue
Block a user