mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 10:04:26 +02:00
Happy New Year 2023!
This commit is contained in:
parent
7942881f7e
commit
1874a32728
1139 changed files with 1261 additions and 1261 deletions
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2022, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
@ -52,7 +52,7 @@ class Following extends BaseApi
|
|||
$request = $this->getRequest([
|
||||
'max_id' => 0, // Return results older than this id
|
||||
'since_id' => 0, // Return results newer than this id
|
||||
'min_id' => 0, // Return results immediately newer than id
|
||||
'min_id' => 0, // Return results immediately newer than id
|
||||
'limit' => 40, // Maximum number of results to return. Defaults to 40.
|
||||
], $request);
|
||||
|
||||
|
@ -60,23 +60,23 @@ class Following extends BaseApi
|
|||
$params = ['order' => ['pid' => true], 'limit' => $request['limit']];
|
||||
|
||||
$condition = ['uid' => $uid, 'self' => false, 'rel' => [Contact::SHARING, Contact::FRIEND]];
|
||||
|
||||
|
||||
if (!empty($request['max_id'])) {
|
||||
$condition = DBA::mergeConditions($condition, ["`pid` < ?", $request['max_id']]);
|
||||
}
|
||||
|
||||
|
||||
if (!empty($request['since_id'])) {
|
||||
$condition = DBA::mergeConditions($condition, ["`pid` > ?", $request['since_id']]);
|
||||
}
|
||||
|
||||
|
||||
if (!empty($request['min_id'])) {
|
||||
$condition = DBA::mergeConditions($condition, ["`pid` > ?", $request['min_id']]);
|
||||
|
||||
|
||||
$params['order'] = ['pid'];
|
||||
}
|
||||
|
||||
|
||||
$accounts = [];
|
||||
|
||||
|
||||
foreach (Contact::selectAccountToArray(['pid'], $condition, $params) as $follower) {
|
||||
self::setBoundaries($follower['pid']);
|
||||
$accounts[] = DI::mstdnAccount()->createFromContactId($follower['pid'], $uid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue