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
|
@ -96,7 +96,7 @@ function pubsub_init(App $a)
|
|||
}
|
||||
|
||||
if (!empty($hub_mode)) {
|
||||
DBA::update('contact', ['subhub' => $subscribe], ['id' => $contact['id']]);
|
||||
Contact::update(['subhub' => $subscribe], ['id' => $contact['id']]);
|
||||
Logger::log($hub_mode . ' success for contact ' . $contact_id . '.');
|
||||
}
|
||||
hub_return(true, $hub_challenge);
|
||||
|
|
|
@ -149,7 +149,7 @@ function unfollow_process(string $url)
|
|||
Contact::remove($contact['id']);
|
||||
$return_path = $base_return_path;
|
||||
} else {
|
||||
DBA::update('contact', ['rel' => Contact::FOLLOWER], ['id' => $contact['id']]);
|
||||
Contact::update(['rel' => Contact::FOLLOWER], ['id' => $contact['id']]);
|
||||
$return_path = $base_return_path . '/' . $contact['id'];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue