kopia lustrzana https://github.com/nextcloud/social
add action field to everyone stream
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>pull/462/head
rodzic
e70f67cea9
commit
0f416c588b
|
@ -325,7 +325,6 @@ class LocalController extends Controller {
|
|||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* @param int $since
|
||||
* @param int $limit
|
||||
|
@ -334,7 +333,7 @@ class LocalController extends Controller {
|
|||
*/
|
||||
public function streamDirect(int $since = 0, int $limit = 5): DataResponse {
|
||||
try {
|
||||
$this->initViewer();
|
||||
$this->initViewer(true);
|
||||
$posts = $this->noteService->getStreamDirect($this->viewer, $since, $limit);
|
||||
|
||||
return $this->success($posts);
|
||||
|
@ -348,6 +347,7 @@ class LocalController extends Controller {
|
|||
* Get timeline
|
||||
*
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* @param int $since
|
||||
* @param int $limit
|
||||
|
@ -356,6 +356,7 @@ class LocalController extends Controller {
|
|||
*/
|
||||
public function streamTimeline(int $since = 0, int $limit = 5): DataResponse {
|
||||
try {
|
||||
$this->initViewer(true);
|
||||
$posts = $this->noteService->getStreamLocalTimeline($since, $limit);
|
||||
|
||||
return $this->success($posts);
|
||||
|
|
|
@ -263,6 +263,7 @@ class NotesRequest extends NotesRequestBuilder {
|
|||
$this->limitPaginate($qb, $since, $limit);
|
||||
$this->limitToRecipient($qb, $actor->getId(), false);
|
||||
$this->leftJoinCacheActors($qb, 'attributed_to');
|
||||
$this->leftJoinStreamAction($qb);
|
||||
|
||||
$notes = [];
|
||||
$cursor = $qb->execute();
|
||||
|
@ -293,6 +294,7 @@ class NotesRequest extends NotesRequestBuilder {
|
|||
$this->limitToAttributedTo($qb, $actorId);
|
||||
$this->leftJoinCacheActors($qb, 'attributed_to');
|
||||
$this->limitToRecipient($qb, ACore::CONTEXT_PUBLIC);
|
||||
$this->leftJoinStreamAction($qb);
|
||||
|
||||
$notes = [];
|
||||
$cursor = $qb->execute();
|
||||
|
@ -357,6 +359,8 @@ class NotesRequest extends NotesRequestBuilder {
|
|||
$this->limitToLocal($qb, true);
|
||||
}
|
||||
$this->leftJoinCacheActors($qb, 'attributed_to');
|
||||
$this->leftJoinStreamAction($qb);
|
||||
|
||||
// TODO: to: = real public, cc: = unlisted !?
|
||||
$this->limitToRecipient($qb, ACore::CONTEXT_PUBLIC, true, ['to']);
|
||||
|
||||
|
@ -398,6 +402,7 @@ class NotesRequest extends NotesRequestBuilder {
|
|||
|
||||
$this->limitPaginate($qb, $since, $limit);
|
||||
$this->leftJoinCacheActors($qb, 'attributed_to');
|
||||
$this->leftJoinStreamAction($qb);
|
||||
|
||||
$notes = [];
|
||||
$cursor = $qb->execute();
|
||||
|
@ -419,6 +424,7 @@ class NotesRequest extends NotesRequestBuilder {
|
|||
public function getNotesSince(int $since): array {
|
||||
$qb = $this->getNotesSelectSql();
|
||||
$this->limitToSince($qb, $since, 'published_time');
|
||||
$this->leftJoinStreamAction($qb);
|
||||
|
||||
$notes = [];
|
||||
$cursor = $qb->execute();
|
||||
|
|
Ładowanie…
Reference in New Issue