Accepting contact request does finally work per Mastodon API

This commit is contained in:
Michael 2022-10-29 19:04:29 +00:00
parent f418687a71
commit f44c9e7975
2 changed files with 10 additions and 2 deletions

View file

@ -47,7 +47,12 @@ class FollowRequests extends BaseApi
self::checkAllowedScope(self::SCOPE_FOLLOW);
$uid = self::getCurrentUserID();
$introduction = DI::intro()->selectOneById($this->parameters['id'], $uid);
$cdata = Contact::getPublicAndUserContactID($this->parameters['id'], $uid);
if (empty($cdata['user'])) {
throw new HTTPException\NotFoundException('Contact not found');
}
$introduction = DI::intro()->selectForContact($cdata['user']);
$contactId = $introduction->cid;