kopia lustrzana https://github.com/nextcloud/social
show all activity when viewing your own profile, not just public activity
some more fine grained checks should be added later but this at least prevents 'you haven't tooted yet' from showing when you have tooted Signed-off-by: Robin Appelman <robin@icewind.nl>pull/1054/head
rodzic
4ff65bcf76
commit
1f7b24d0f2
|
@ -408,7 +408,9 @@ class SocialLimitsQueryBuilder extends SocialCrossQueryBuilder {
|
|||
$andX = $expr->andX();
|
||||
|
||||
$andX->add($expr->eq($alias . '.stream_id', $this->getDefaultSelectAlias() . '.id_prim'));
|
||||
$andX->add($this->exprLimitToDBField('actor_id', $this->prim($actorId), true, true, $alias));
|
||||
if ($actorId) {
|
||||
$andX->add($this->exprLimitToDBField('actor_id', $this->prim($actorId), true, true, $alias));
|
||||
}
|
||||
$andX->add($this->exprLimitToDBField('type', $type, true, true, $alias));
|
||||
|
||||
if ($subType !== '') {
|
||||
|
|
|
@ -489,7 +489,8 @@ class StreamRequest extends StreamRequestBuilder {
|
|||
|
||||
$qb->selectDestFollowing('sd', '');
|
||||
$qb->innerJoinSteamDest('recipient', 'id_prim', 'sd', 's');
|
||||
$qb->limitToDest(ACore::CONTEXT_PUBLIC, 'recipient', '', 'sd');
|
||||
$accountIsViewer = ($this->viewer) ? $this->viewer->getId() === $actorId : false;
|
||||
$qb->limitToDest($accountIsViewer ? '' : ACore::CONTEXT_PUBLIC, 'recipient', '', 'sd');
|
||||
|
||||
$qb->linkToCacheActors('ca', 's.attributed_to_prim');
|
||||
$qb->leftJoinStreamAction();
|
||||
|
|
Ładowanie…
Reference in New Issue