mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-09 16:44:26 +02:00
Unified request for uid
This commit is contained in:
parent
85217941e3
commit
11c8dfe73a
6 changed files with 11 additions and 21 deletions
|
@ -40,7 +40,7 @@ class Follow extends BaseApi
|
|||
DI::mstdnError()->UnprocessableEntity();
|
||||
}
|
||||
|
||||
$cid = Contact::follow($parameters['id'], self::getCurrentUserID());
|
||||
$cid = Contact::follow($parameters['id'], $uid);
|
||||
|
||||
System::jsonExit(DI::mstdnRelationship()->createFromContactId($cid, $uid)->toArray());
|
||||
}
|
||||
|
|
|
@ -42,6 +42,8 @@ class Statuses extends BaseApi
|
|||
*/
|
||||
public static function rawContent(array $parameters = [])
|
||||
{
|
||||
$uid = self::getCurrentUserID();
|
||||
|
||||
if (empty($parameters['id'])) {
|
||||
DI::mstdnError()->UnprocessableEntity();
|
||||
}
|
||||
|
@ -66,8 +68,6 @@ class Statuses extends BaseApi
|
|||
|
||||
$params = ['order' => ['uri-id' => true], 'limit' => $request['limit']];
|
||||
|
||||
$uid = self::getCurrentUserID();
|
||||
|
||||
if (!$uid) {
|
||||
$condition = ['author-id' => $id, 'private' => [Item::PUBLIC, Item::UNLISTED],
|
||||
'uid' => 0, 'network' => Protocol::FEDERATED];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue