Prefer the local user when displaying items

This commit is contained in:
Michael 2021-10-01 05:26:13 +00:00
parent 57ac1e5b92
commit d8447469b6

View file

@ -246,11 +246,11 @@ function display_content(App $a, $update = false, $update_uid = 0)
$page_uid = 0;
$parent = null;
if (!empty($parent_uri_id)) {
if (!local_user() && !empty($parent_uri_id)) {
$parent = Post::selectFirst(['uid'], ['uri-id' => $parent_uri_id, 'wall' => true]);
}
if (DBA::isResult($parent)) {
if (!local_user() && DBA::isResult($parent)) {
$page_uid = $page_uid ?? 0 ?: $parent['uid'];
$is_remote_contact = Session::getRemoteContactID($page_uid);
if ($is_remote_contact) {