mirror of
https://github.com/friendica/friendica
synced 2025-04-25 20:30:11 +00:00
Fix follow/unfollow
This commit is contained in:
parent
26f8392754
commit
534db0d09a
23 changed files with 236 additions and 90 deletions
|
@ -21,7 +21,6 @@
|
|||
|
||||
namespace Friendica\Module\Api\Mastodon;
|
||||
|
||||
use Friendica\Core\System;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Module\BaseApi;
|
||||
|
@ -47,12 +46,12 @@ class FollowRequests extends BaseApi
|
|||
$this->checkAllowedScope(self::SCOPE_FOLLOW);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
||||
$cdata = Contact::getPublicAndUserContactID($this->parameters['id'], $uid);
|
||||
if (empty($cdata['user'])) {
|
||||
$ucid = Contact::getUserContactId($this->parameters['id'], $uid);
|
||||
if (!$ucid) {
|
||||
throw new HTTPException\NotFoundException('Contact not found');
|
||||
}
|
||||
|
||||
$introduction = DI::intro()->selectForContact($cdata['user']);
|
||||
$introduction = DI::intro()->selectForContact($ucid);
|
||||
|
||||
$contactId = $introduction->cid;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue