Update AP helpers, update user agent
This commit is contained in:
parent
ef575ed483
commit
155e960f54
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue