mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-02-21 13:46:55 +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()
|
public static function zttpUserAgent()
|
||||||
{
|
{
|
||||||
|
$version = config('pixelfed.version');
|
||||||
|
$url = config('app.url');
|
||||||
return [
|
return [
|
||||||
'Accept' => 'application/activity+json',
|
'Accept' => 'application/activity+json',
|
||||||
'User-Agent' => 'PixelfedBot - https://pixelfed.org',
|
'User-Agent' => "(Pixelfed/{$version}; +{$url})",
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -236,10 +238,6 @@ class Helpers {
|
||||||
$activity = ['object' => $res];
|
$activity = ['object' => $res];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($activity['object']['content']) == false) {
|
|
||||||
abort(400, 'Invalid object');
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope = 'private';
|
$scope = 'private';
|
||||||
|
|
||||||
$cw = isset($res['sensitive']) ? (bool) $res['sensitive'] : false;
|
$cw = isset($res['sensitive']) ? (bool) $res['sensitive'] : false;
|
||||||
|
|
Loading…
Reference in a new issue