]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Contact/Relation.php
Use rawContent for Special Options to avoid a protected options() method
[friendica.git] / src / Model / Contact / Relation.php
index b9d38790db5bf4b1a88a1f55a9cd7d3b60ff6e44..d68555eb3e854f2df8e5e6423dd47439e47176a1 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -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;
        }