]> git.mxchange.org Git - friendica.git/commitdiff
Avoid contact update for non federated networks
authorMichael <heluecht@pirati.ca>
Mon, 25 Nov 2019 08:49:14 +0000 (08:49 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 25 Nov 2019 08:49:14 +0000 (08:49 +0000)
src/Model/Contact.php

index d7e05f6e8bb1e5f4b9329a924114b6f9936458d5..765c44064666c208e3d60478a74b903e29b423f5 100644 (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