mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-08 21:30:46 +00:00
Update ap pipelines
This commit is contained in:
parent
498b46f70f
commit
5a5d00b947
4 changed files with 24 additions and 16 deletions
|
@ -127,13 +127,15 @@ class SharePipeline implements ShouldQueue
|
|||
'timeout' => config('federation.activitypub.delivery.timeout')
|
||||
]);
|
||||
|
||||
$requests = function($audience) use ($client, $activity, $profile, $payload) {
|
||||
$version = config('pixelfed.version');
|
||||
$appUrl = config('app.url');
|
||||
$userAgent = "(Pixelfed/{$version}; +{$appUrl})";
|
||||
|
||||
$requests = function($audience) use ($client, $activity, $profile, $payload, $userAgent) {
|
||||
foreach($audience as $url) {
|
||||
$version = config('pixelfed.version');
|
||||
$appUrl = config('app.url');
|
||||
$headers = HttpSignature::sign($profile, $url, $activity, [
|
||||
'Content-Type' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
|
||||
'User-Agent' => "(Pixelfed/{$version}; +{$appUrl})",
|
||||
'User-Agent' => $userAgent,
|
||||
]);
|
||||
yield function() use ($client, $url, $headers, $payload) {
|
||||
return $client->postAsync($url, [
|
||||
|
|
|
@ -90,13 +90,15 @@ class UndoSharePipeline implements ShouldQueue
|
|||
'timeout' => config('federation.activitypub.delivery.timeout')
|
||||
]);
|
||||
|
||||
$requests = function($audience) use ($client, $activity, $profile, $payload) {
|
||||
$version = config('pixelfed.version');
|
||||
$appUrl = config('app.url');
|
||||
$userAgent = "(Pixelfed/{$version}; +{$appUrl})";
|
||||
|
||||
$requests = function($audience) use ($client, $activity, $profile, $payload, $userAgent) {
|
||||
foreach($audience as $url) {
|
||||
$version = config('pixelfed.version');
|
||||
$appUrl = config('app.url');
|
||||
$headers = HttpSignature::sign($profile, $url, $activity, [
|
||||
'Content-Type' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
|
||||
'User-Agent' => "(Pixelfed/{$version}; +{$appUrl})",
|
||||
'User-Agent' => $userAgent,
|
||||
]);
|
||||
yield function() use ($client, $url, $headers, $payload) {
|
||||
return $client->postAsync($url, [
|
||||
|
|
|
@ -85,13 +85,15 @@ class StatusActivityPubDeliver implements ShouldQueue
|
|||
'timeout' => config('federation.activitypub.delivery.timeout')
|
||||
]);
|
||||
|
||||
$requests = function($audience) use ($client, $activity, $profile, $payload) {
|
||||
$version = config('pixelfed.version');
|
||||
$appUrl = config('app.url');
|
||||
$userAgent = "(Pixelfed/{$version}; +{$appUrl})";
|
||||
|
||||
$requests = function($audience) use ($client, $activity, $profile, $payload, $userAgent) {
|
||||
foreach($audience as $url) {
|
||||
$version = config('pixelfed.version');
|
||||
$appUrl = config('app.url');
|
||||
$headers = HttpSignature::sign($profile, $url, $activity, [
|
||||
'Content-Type' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
|
||||
'User-Agent' => "(Pixelfed/{$version}; +{$appUrl})",
|
||||
'User-Agent' => $userAgent,
|
||||
]);
|
||||
yield function() use ($client, $url, $headers, $payload) {
|
||||
return $client->postAsync($url, [
|
||||
|
|
|
@ -164,13 +164,15 @@ class StatusDelete implements ShouldQueue
|
|||
'timeout' => config('federation.activitypub.delivery.timeout')
|
||||
]);
|
||||
|
||||
$requests = function($audience) use ($client, $activity, $profile, $payload) {
|
||||
$version = config('pixelfed.version');
|
||||
$appUrl = config('app.url');
|
||||
$userAgent = "(Pixelfed/{$version}; +{$appUrl})";
|
||||
|
||||
$requests = function($audience) use ($client, $activity, $profile, $payload, $userAgent) {
|
||||
foreach($audience as $url) {
|
||||
$version = config('pixelfed.version');
|
||||
$appUrl = config('app.url');
|
||||
$headers = HttpSignature::sign($profile, $url, $activity, [
|
||||
'Content-Type' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
|
||||
'User-Agent' => "(Pixelfed/{$version}; +{$appUrl})",
|
||||
'User-Agent' => $userAgent,
|
||||
]);
|
||||
yield function() use ($client, $url, $headers, $payload) {
|
||||
return $client->postAsync($url, [
|
||||
|
|
Loading…
Reference in a new issue