Fix performance issues due to relay contact requests

This commit is contained in:
Michael Vogel 2019-09-02 15:11:07 +02:00
parent db16f1a106
commit 046b5a1eac
2 changed files with 5 additions and 3 deletions

View 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;
}