]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Diaspora.php
Fix performance issues due to relay contact requests
[friendica.git] / src / Protocol / Diaspora.php
index a0bb0d9fa3a7796a3efdac08067a66aa60b4509b..2ff271ee0da0a2a40cf6b7fd29dfb99d967fd3ad 100644 (file)
@@ -62,7 +62,8 @@ class Diaspora
                        $relay_contact = $contact;
                } elseif (empty($contact['baseurl'])) {
                        if (!empty($contact['batch'])) {
-                               $relay_contact = DBA::selectFirst('contact', [], ['batch' => $contact['batch'], 'contact-type' => Contact::TYPE_RELAY, 'uid' => 0]);
+                               $condition = ['uid' => 0, 'network' => Protocol::FEDERATED, 'batch' => $contact['batch'], 'contact-type' => Contact::TYPE_RELAY];
+                               $relay_contact = DBA::selectFirst('contact', [], $condition);
                        } else {
                                return;
                        }