Update AP helpers, update user agent

This commit is contained in:
Daniel Supernault 2020-04-29 13:31:47 -06:00
parent ef575ed483
commit 155e960f54
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -181,9 +181,11 @@ class Helpers {
public static function zttpUserAgent()
{
$version = config('pixelfed.version');
$url = config('app.url');
return [
'Accept' => 'application/activity+json',
'User-Agent' => 'PixelfedBot - https://pixelfed.org',
'User-Agent' => "(Pixelfed/{$version}; +{$url})",
];
}
@ -236,10 +238,6 @@ class Helpers {
$activity = ['object' => $res];
}
if(isset($activity['object']['content']) == false) {
abort(400, 'Invalid object');
}
$scope = 'private';
$cw = isset($res['sensitive']) ? (bool) $res['sensitive'] : false;