mirror of
https://github.com/friendica/friendica
synced 2025-04-28 22:24:22 +02: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
|
@ -114,7 +114,7 @@ class Relation
|
|||
}
|
||||
|
||||
if (empty($followers) && empty($followings)) {
|
||||
DBA::update('contact', ['last-discovery' => DateTimeFormat::utcNow()], ['id' => $contact['id']]);
|
||||
Contact::update(['last-discovery' => DateTimeFormat::utcNow()], ['id' => $contact['id']]);
|
||||
Logger::info('The contact does not offer discoverable data', ['id' => $contact['id'], 'url' => $url, 'network' => $contact['network']]);
|
||||
return;
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ class Relation
|
|||
DBA::delete('contact-relation', ['cid' => $target, 'follows' => false, 'last-interaction' => DBA::NULL_DATETIME]);
|
||||
}
|
||||
|
||||
DBA::update('contact', ['last-discovery' => DateTimeFormat::utcNow()], ['id' => $target]);
|
||||
Contact::update(['last-discovery' => DateTimeFormat::utcNow()], ['id' => $target]);
|
||||
Logger::info('Contacts discovery finished', ['id' => $target, 'url' => $url, 'follower' => $follower_counter, 'following' => $following_counter]);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue