1
0
Fork 0
forked from mirror/pixelfed

Update RemoteFollow pipeline

This commit is contained in:
Daniel Supernault 2019-04-03 13:24:27 -06:00
parent 42daaa15b7
commit d40af20013
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

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