mirror of
https://github.com/friendica/friendica
synced 2025-04-25 12:30: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
|
@ -50,7 +50,7 @@ class Note extends BaseApi
|
|||
DI::mstdnError()->RecordNotFound();
|
||||
}
|
||||
|
||||
DBA::update('contact', ['info' => $request['comment']], ['id' => $cdata['user']]);
|
||||
Contact::update(['info' => $request['comment']], ['id' => $cdata['user']]);
|
||||
|
||||
System::jsonExit(DI::mstdnRelationship()->createFromContactId($parameters['id'], $uid)->toArray());
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ class Contact extends BaseModule
|
|||
|
||||
$info = Strings::escapeHtml(trim($_POST['info'] ?? ''));
|
||||
|
||||
$r = DBA::update('contact', [
|
||||
$r = Model\Contact::update([
|
||||
'priority' => $priority,
|
||||
'info' => $info,
|
||||
'hidden' => $hidden,
|
||||
|
@ -175,7 +175,7 @@ class Contact extends BaseModule
|
|||
$result = Model\Contact::createFromProbeForUser($contact['uid'], $contact['url'], $contact['network']);
|
||||
|
||||
if ($result['success']) {
|
||||
DBA::update('contact', ['subhub' => 1], ['id' => $contact_id]);
|
||||
Model\Contact::update(['subhub' => 1], ['id' => $contact_id]);
|
||||
}
|
||||
|
||||
// pull feed and consume it, which should subscribe to the hub.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue