Fix follow/unfollow

This commit is contained in:
Michael 2024-07-31 04:37:17 +00:00
parent 26f8392754
commit 534db0d09a
23 changed files with 236 additions and 90 deletions

View file

@ -45,12 +45,12 @@ class Note extends BaseApi
'comment' => '',
], $request);
$cdata = Contact::getPublicAndUserContactID($this->parameters['id'], $uid);
if (empty($cdata['user'])) {
$ucid = Contact::getUserContactId($this->parameters['id'], $uid);
if (!$ucid) {
$this->logAndJsonError(404, $this->errorFactory->RecordNotFound());
}
Contact::update(['info' => $request['comment']], ['id' => $cdata['user']]);
Contact::update(['info' => $request['comment']], ['id' => $ucid]);
$this->jsonExit(DI::mstdnRelationship()->createFromContactId($this->parameters['id'], $uid)->toArray());
}