mirror of
https://github.com/friendica/friendica
synced 2025-04-23 09:10:10 +00:00
Add return value to Model\Contact::addRelationship to remove protocol-specific code from it
This commit is contained in:
parent
10dfe4347b
commit
ea77f214d7
2 changed files with 16 additions and 17 deletions
|
@ -542,6 +542,13 @@ class Processor
|
|||
self::switchContact($item['author-id']);
|
||||
|
||||
$result = Contact::addRelationship($owner, $contact, $item, false, $note);
|
||||
if ($result === false) {
|
||||
ActivityPub\Transmitter::sendContactReject($item['author-link'], $item['author-id'], $owner['uid']);
|
||||
return;
|
||||
}elseif ($result === true) {
|
||||
ActivityPub\Transmitter::sendContactAccept($item['author-link'], $item['author-id'], $owner['uid']);
|
||||
}
|
||||
|
||||
$cid = Contact::getIdForURL($activity['actor'], $uid);
|
||||
if (empty($cid)) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue