Use a better query to fetch the relay actor

pull/11555/head
Michael 2022-05-24 08:06:48 +00:00
rodzic e68ff3b3bb
commit 8969e83134
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -179,7 +179,8 @@ class Delivery
*/
private static function fetchActorForRelayInbox(string $inbox): string
{
$apcontact = DBA::selectFirst('apcontact', ['url'], ['sharedinbox' => $inbox, 'type' => 'Application']);
$apcontact = DBA::selectFirst('apcontact', ['url'], ["`sharedinbox` = ? AND `type` = ? AND `url` IN (SELECT `url` FROM `contact` WHERE `uid` = ? AND `rel` = ?)",
$inbox, 'Application', 0, Contact::FRIEND]);
return $apcontact['url'] ?? '';
}