1
0
Fork 0

Merge pull request #1118 from pixelfed/frontend-ui-refactor

Update RemoteFollow pipeline
This commit is contained in:
daniel 2019-04-03 13:25:04 -06:00 committed by GitHub
commit 7d36d24d13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -16,6 +16,7 @@ use Illuminate\Queue\SerializesModels;
use Log;
use Storage;
use Zttp\Zttp;
use App\Util\ActivityPub\Helpers;
class RemoteFollowImportRecent implements ShouldQueue
{
@ -60,9 +61,10 @@ class RemoteFollowImportRecent implements ShouldQueue
public function fetchOutbox($url = false)
{
Log::info(json_encode($url));
$url = ($url == false) ? $this->actor['outbox'] : $url;
if(Helpers::validateUrl($url) == false) {
return;
}
$response = Zttp::withHeaders([
'User-Agent' => 'PixelFedBot v0.1 - https://pixelfed.org',
])->get($url);