forked from GNUsocial/gnu-social
preserve activities in object
This commit is contained in:
parent
810304159e
commit
db899a07a5
@ -28,6 +28,8 @@
|
|||||||
|
|
||||||
class UserActivityStream extends AtomUserNoticeFeed
|
class UserActivityStream extends AtomUserNoticeFeed
|
||||||
{
|
{
|
||||||
|
public $activities = array();
|
||||||
|
|
||||||
function __construct($user, $indent = true)
|
function __construct($user, $indent = true)
|
||||||
{
|
{
|
||||||
parent::__construct($user, null, $indent);
|
parent::__construct($user, null, $indent);
|
||||||
@ -45,10 +47,15 @@ class UserActivityStream extends AtomUserNoticeFeed
|
|||||||
usort($objs, 'UserActivityStream::compareObject');
|
usort($objs, 'UserActivityStream::compareObject');
|
||||||
|
|
||||||
foreach ($objs as $obj) {
|
foreach ($objs as $obj) {
|
||||||
$act = $obj->asActivity();
|
$this->activities[] = $obj->asActivity();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderEntries()
|
||||||
|
{
|
||||||
|
foreach ($this->activities as $act) {
|
||||||
// Only show the author sub-element if it's different from default user
|
// Only show the author sub-element if it's different from default user
|
||||||
$str = $act->asString(false, ($act->actor->id != $this->user->uri));
|
$act->outputTo($this, false, ($act->actor->id != $this->user->uri));
|
||||||
$this->addEntryRaw($str);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user