1
0
Fork 0

Use a better query to fetch the relay actor

This commit is contained in:
Michael 2022-05-24 08:06:48 +00:00
parent e68ff3b3bb
commit 8969e83134

View file

@ -179,7 +179,8 @@ class Delivery
*/ */
private static function fetchActorForRelayInbox(string $inbox): string 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'] ?? ''; return $apcontact['url'] ?? '';
} }