Always use direct DFRN transport on local contacts

This commit is contained in:
Michael 2019-09-21 12:39:07 +00:00
parent 7e600df9a6
commit c364a77d63
3 changed files with 36 additions and 8 deletions

View file

@ -544,6 +544,10 @@ class Transmitter
$contacts = DBA::select('contact', ['url', 'network', 'protocol'], $condition);
while ($contact = DBA::fetch($contacts)) {
if (Contact::isLocal($contact['url'])) {
continue;
}
if (!in_array($contact['network'], $networks) && ($contact['protocol'] != Protocol::ACTIVITYPUB)) {
continue;
}
@ -611,6 +615,10 @@ class Transmitter
if ($receiver == $item_profile['followers']) {
$inboxes = array_merge($inboxes, self::fetchTargetInboxesforUser($uid, $personal));
} else {
if (Contact::isLocal($receiver)) {
continue;
}
$profile = APContact::getByURL($receiver, false);
if (!empty($profile)) {
if (empty($profile['sharedinbox']) || $personal || $blindcopy) {