1
0
Fork 0

Avoid contact update for non federated networks

This commit is contained in:
Michael 2019-11-25 08:49:14 +00:00
parent 4d95e9c3ed
commit 67a0e97f7c

View file

@ -1459,11 +1459,15 @@ class Contact extends BaseObject
$contact_id = $contact["id"];
// Update the contact every 7 days
$update_contact = ($contact['updated'] < DateTimeFormat::utc('now -7 days'));
if (in_array($contact['network'], Protocol::NATIVE_SUPPORT)) {
$update_contact = ($contact['updated'] < DateTimeFormat::utc('now -7 days'));
// We force the update if the avatar is empty
if (empty($contact['avatar'])) {
$update_contact = true;
// We force the update if the avatar is empty
if (empty($contact['avatar'])) {
$update_contact = true;
}
} else {
$update_contact = false;
}
// Update the contact in the background if needed but it is called by the frontend