Merge pull request #8862 from annando/issue-8860

Issue 8860: Activities weren't fetchable all the time
This commit is contained in:
Hypolite Petovan 2020-07-11 14:14:03 -04:00 committed by GitHub
commit 090fa78057
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 6 deletions

View file

@ -57,7 +57,7 @@ class Objects extends BaseModule
['order' => ['origin' => true]]
);
// Valid items are original post or posted from this node (including in the case of a forum)
if (!DBA::isResult($item) || !$item['origin'] && !strstr($item['author-link'], DI::baseUrl()->get())) {
if (!DBA::isResult($item) || !$item['origin'] && (parse_url($item['author-link'], PHP_URL_HOST) != parse_url(DI::baseUrl()->get(), PHP_URL_HOST))) {
throw new HTTPException\NotFoundException();
}