More rework to make private communities working

This commit is contained in:
Michael 2022-02-16 22:56:55 +00:00
parent 6c0dbc1775
commit 9ac24a0f36
8 changed files with 79 additions and 67 deletions

View file

@ -667,6 +667,15 @@ class Receiver
$uid = $receiver['uid'];
}
}
// When we haven't found any user yet, we just chose a user who most likely could have access to the content
if (empty($uid)) {
$contact = Contact::selectFirst(['uid'], ['nurl' => Strings::normaliseLink($actor), 'rel' => [Contact::SHARING, Contact::FRIEND]]);
if (!empty($contact['uid'])) {
$uid = $contact['uid'];
}
}
return $uid;
}