forked from GNUsocial/gnu-social
Revert "Revert "Show <activity:subject> and no activity actors for user feed""
This reverts commit e2578cfad6
.
This commit is contained in:
parent
b97ac60209
commit
f210cadfec
@ -1106,7 +1106,7 @@ class Notice extends Memcached_DataObject
|
||||
return $groups;
|
||||
}
|
||||
|
||||
function asAtomEntry($namespace=false, $source=false)
|
||||
function asAtomEntry($namespace=false, $source=false, $author=true)
|
||||
{
|
||||
$profile = $this->getProfile();
|
||||
|
||||
@ -1151,8 +1151,10 @@ class Notice extends Memcached_DataObject
|
||||
|
||||
$xs->element('title', null, $this->content);
|
||||
|
||||
$xs->raw($profile->asAtomAuthor());
|
||||
$xs->raw($profile->asActivityActor());
|
||||
if ($author) {
|
||||
$xs->raw($profile->asAtomAuthor());
|
||||
$xs->raw($profile->asActivityActor());
|
||||
}
|
||||
|
||||
$xs->element('link', array('rel' => 'alternate',
|
||||
'type' => 'text/html',
|
||||
|
@ -107,9 +107,19 @@ class AtomNoticeFeed extends Atom10Feed
|
||||
*/
|
||||
function addEntryFromNotice($notice)
|
||||
{
|
||||
$this->addEntryRaw($notice->asAtomEntry());
|
||||
$source = $this->showSource();
|
||||
$author = $this->showAuthor();
|
||||
|
||||
$this->addEntryRaw($notice->asAtomEntry(false, $source, $author));
|
||||
}
|
||||
|
||||
function showSource()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
function showAuthor()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -61,6 +61,7 @@ class AtomUserNoticeFeed extends AtomNoticeFeed
|
||||
if (!empty($user)) {
|
||||
$profile = $user->getProfile();
|
||||
$this->addAuthor($profile->nickname, $user->uri);
|
||||
$this->setActivitySubject($profile->asActivityNoun('subject'));
|
||||
}
|
||||
|
||||
$title = sprintf(_("%s timeline"), $user->nickname);
|
||||
@ -105,4 +106,14 @@ class AtomUserNoticeFeed extends AtomNoticeFeed
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
|
||||
function showSource()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
function showAuthor()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user