mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-11 12:24:27 +02:00
Fix follow/unfollow
This commit is contained in:
parent
26f8392754
commit
534db0d09a
23 changed files with 236 additions and 90 deletions
|
@ -71,13 +71,13 @@ class Destroy extends ContactEndpoint
|
|||
}
|
||||
|
||||
// Get Contact by given id
|
||||
$cdata = Contact::getPublicAndUserContactID($contact_id, $uid);
|
||||
if (!empty($cdata['user'])) {
|
||||
$ucid = Contact::getUserContactId($contact_id, $uid);
|
||||
if (!$ucid) {
|
||||
Logger::notice(BaseApi::LOG_PREFIX . 'Not following contact', ['module' => 'api', 'action' => 'friendships_destroy']);
|
||||
throw new HTTPException\NotFoundException('Not following Contact');
|
||||
}
|
||||
|
||||
$contact = Contact::getById($cdata['user']);
|
||||
$contact = Contact::getById($ucid);
|
||||
$user = $this->twitterUser->createFromContactId($contact_id, $uid, true)->toArray();
|
||||
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue