[ActivityPub][NOTICE] Process attachments

This commit is contained in:
Diogo Cordeiro
2020-08-05 17:21:30 +01:00
committed by Diogo Peralta Cordeiro
parent 4c92cc967b
commit 33721c85cd
2 changed files with 23 additions and 1 deletions

View File

@@ -97,7 +97,7 @@ class ActivityPubPlugin extends Plugin
// Look for a local notice (unfortunately GNU social doesn't
// provide this functionality natively)
try {
$candidate = Notice::getByID(intval(substr($url, (strlen(common_local_url('apNotice', ['id' => 0]))-1))));
$candidate = Notice::getByID((int)substr($url, (strlen(common_local_url('apNotice', ['id' => 0]))-1)));
if (common_local_url('apNotice', ['id' => $candidate->getID()]) === $url) { // Sanity check
return $candidate;
} else {