mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update AP helpers, update user agent
This commit is contained in:
parent
ef575ed483
commit
155e960f54
1 changed files with 3 additions and 5 deletions
|
@ -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