Added scope check

This commit is contained in:
Michael 2021-05-16 07:37:11 +00:00
parent 33573dda34
commit 49207a8624
53 changed files with 107 additions and 62 deletions

View file

@ -33,7 +33,7 @@ class Follow extends BaseApi
{
public static function post(array $parameters = [])
{
self::login();
self::login(self::SCOPE_FOLLOW);
$uid = self::getCurrentUserID();
if (empty($parameters['id'])) {
@ -42,6 +42,6 @@ class Follow extends BaseApi
$cid = Contact::follow($parameters['id'], self::getCurrentUserID());
System::jsonExit(DI::mstdnRelationship()->createFromContactId($cid)->toArray());
System::jsonExit(DI::mstdnRelationship()->createFromContactId($cid, $uid)->toArray());
}
}