mirror of
https://github.com/friendica/friendica
synced 2025-04-25 13:10:11 +00:00
Use centralized function to update contact entries
This commit is contained in:
parent
a4b0ab90b1
commit
9c14eb0c6b
20 changed files with 90 additions and 72 deletions
|
@ -912,7 +912,7 @@ class Processor
|
|||
$cid = Contact::getIdForURL($activity['actor'], $uid);
|
||||
if (!empty($cid)) {
|
||||
self::switchContact($cid);
|
||||
DBA::update('contact', ['hub-verify' => $activity['id'], 'protocol' => Protocol::ACTIVITYPUB], ['id' => $cid]);
|
||||
Contact::update(['hub-verify' => $activity['id'], 'protocol' => Protocol::ACTIVITYPUB], ['id' => $cid]);
|
||||
}
|
||||
|
||||
$item = ['author-id' => Contact::getIdForURL($activity['actor']),
|
||||
|
@ -932,7 +932,7 @@ class Processor
|
|||
}
|
||||
|
||||
if (empty($contact)) {
|
||||
DBA::update('contact', ['hub-verify' => $activity['id'], 'protocol' => Protocol::ACTIVITYPUB], ['id' => $cid]);
|
||||
Contact::update(['hub-verify' => $activity['id'], 'protocol' => Protocol::ACTIVITYPUB], ['id' => $cid]);
|
||||
}
|
||||
|
||||
Logger::notice('Follow user ' . $uid . ' from contact ' . $cid . ' with id ' . $activity['id']);
|
||||
|
@ -1011,7 +1011,7 @@ class Processor
|
|||
}
|
||||
|
||||
$condition = ['id' => $cid];
|
||||
DBA::update('contact', $fields, $condition);
|
||||
Contact::update($fields, $condition);
|
||||
Logger::info('Accept contact request', ['contact' => $cid, 'user' => $uid]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue