mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 00:04:27 +02:00
Fix follow/unfollow
This commit is contained in:
parent
26f8392754
commit
534db0d09a
23 changed files with 236 additions and 90 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue