use the hubloc_url instead of the xchan_url as they might be different.

This commit is contained in:
Mike Macgirvin 2023-08-11 07:28:47 +10:00
parent 191305ac68
commit 88373c7140

View file

@ -1539,13 +1539,13 @@ function conv_sort($arr, $order)
// or other channel streams on this site which are not owned by the viewer // or other channel streams on this site which are not owned by the viewer
if (local_channel()) { if (local_channel()) {
$m = parse_url($item['author']['xchan_url']); $m = parse_url($item['author']['hubloc_url']);
$authorSite = $m['scheme'] . '://' . $m['host'] $authorSite = $m['scheme'] . '://' . $m['host']
. ((isset($m['port']) && intval($m['port'])) ? ':' . $m['port'] : ''); . ((isset($m['port']) && intval($m['port'])) ? ':' . $m['port'] : '');
$m = parse_url($item['owner']['xchan_url']); $m = parse_url($item['owner']['hubloc_url']);
$ownerSite = $m['scheme'] . '://' . $m['host'] $ownerSite = $m['scheme'] . '://' . $m['host']
. ((isset($m['port']) && intval($m['port'])) ? ':' . $m['port'] : ''); . ((isset($m['port']) && intval($m['port'])) ? ':' . $m['port'] : '');
if (LibBlock::fetch_by_entity(local_channel(), $authorSite) if (LibBlock::fetch_by_entity(local_channel(), $authorSite)
|| LibBlock::fetch_by_entity(local_channel(), $ownerSite)) { || LibBlock::fetch_by_entity(local_channel(), $ownerSite)) {
continue; continue;