mirror of
https://github.com/friendica/friendica
synced 2025-04-23 19:50:11 +00:00
Refactor Model\Contact::addRelationship
- Remove unused parameter $item - Replace q() call with DBA::insert - Update check on $contact that can only be an array now - Add moethod doc block
This commit is contained in:
parent
956ae6241d
commit
3114754f4b
4 changed files with 33 additions and 30 deletions
|
@ -530,7 +530,7 @@ class Processor
|
|||
DBA::update('contact', ['hub-verify' => $activity['id'], 'protocol' => Protocol::ACTIVITYPUB], ['id' => $cid]);
|
||||
$contact = DBA::selectFirst('contact', [], ['id' => $cid, 'network' => Protocol::NATIVE_SUPPORT]);
|
||||
} else {
|
||||
$contact = false;
|
||||
$contact = [];
|
||||
}
|
||||
|
||||
$item = ['author-id' => Contact::getIdForURL($activity['actor']),
|
||||
|
@ -541,7 +541,7 @@ class Processor
|
|||
// Ensure that the contact has got the right network type
|
||||
self::switchContact($item['author-id']);
|
||||
|
||||
Contact::addRelationship($owner, $contact, $item, '', false, $note);
|
||||
$result = Contact::addRelationship($owner, $contact, $item, false, $note);
|
||||
$cid = Contact::getIdForURL($activity['actor'], $uid);
|
||||
if (empty($cid)) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue