mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-30 08:53:17 +00:00
commit
81424e7939
6 changed files with 28 additions and 18 deletions
|
@ -17,6 +17,7 @@ use Mail;
|
||||||
use Purify;
|
use Purify;
|
||||||
use App\Mail\PasswordChange;
|
use App\Mail\PasswordChange;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use App\Services\AccountService;
|
||||||
use App\Services\PronounService;
|
use App\Services\PronounService;
|
||||||
|
|
||||||
trait HomeSettings
|
trait HomeSettings
|
||||||
|
@ -99,10 +100,10 @@ trait HomeSettings
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($changes === true) {
|
if ($changes === true) {
|
||||||
Cache::forget('user:account:id:'.$user->id);
|
|
||||||
$user->save();
|
$user->save();
|
||||||
$profile->save();
|
$profile->save();
|
||||||
|
Cache::forget('user:account:id:'.$user->id);
|
||||||
|
AccountService::del($profile->id);
|
||||||
return redirect('/settings/home')->with('status', 'Profile successfully updated!');
|
return redirect('/settings/home')->with('status', 'Profile successfully updated!');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,13 +127,15 @@ class SharePipeline implements ShouldQueue
|
||||||
'timeout' => config('federation.activitypub.delivery.timeout')
|
'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) {
|
foreach($audience as $url) {
|
||||||
$version = config('pixelfed.version');
|
|
||||||
$appUrl = config('app.url');
|
|
||||||
$headers = HttpSignature::sign($profile, $url, $activity, [
|
$headers = HttpSignature::sign($profile, $url, $activity, [
|
||||||
'Content-Type' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
|
'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) {
|
yield function() use ($client, $url, $headers, $payload) {
|
||||||
return $client->postAsync($url, [
|
return $client->postAsync($url, [
|
||||||
|
|
|
@ -90,13 +90,15 @@ class UndoSharePipeline implements ShouldQueue
|
||||||
'timeout' => config('federation.activitypub.delivery.timeout')
|
'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) {
|
foreach($audience as $url) {
|
||||||
$version = config('pixelfed.version');
|
|
||||||
$appUrl = config('app.url');
|
|
||||||
$headers = HttpSignature::sign($profile, $url, $activity, [
|
$headers = HttpSignature::sign($profile, $url, $activity, [
|
||||||
'Content-Type' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
|
'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) {
|
yield function() use ($client, $url, $headers, $payload) {
|
||||||
return $client->postAsync($url, [
|
return $client->postAsync($url, [
|
||||||
|
|
|
@ -85,13 +85,15 @@ class StatusActivityPubDeliver implements ShouldQueue
|
||||||
'timeout' => config('federation.activitypub.delivery.timeout')
|
'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) {
|
foreach($audience as $url) {
|
||||||
$version = config('pixelfed.version');
|
|
||||||
$appUrl = config('app.url');
|
|
||||||
$headers = HttpSignature::sign($profile, $url, $activity, [
|
$headers = HttpSignature::sign($profile, $url, $activity, [
|
||||||
'Content-Type' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
|
'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) {
|
yield function() use ($client, $url, $headers, $payload) {
|
||||||
return $client->postAsync($url, [
|
return $client->postAsync($url, [
|
||||||
|
|
|
@ -164,13 +164,15 @@ class StatusDelete implements ShouldQueue
|
||||||
'timeout' => config('federation.activitypub.delivery.timeout')
|
'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) {
|
foreach($audience as $url) {
|
||||||
$version = config('pixelfed.version');
|
|
||||||
$appUrl = config('app.url');
|
|
||||||
$headers = HttpSignature::sign($profile, $url, $activity, [
|
$headers = HttpSignature::sign($profile, $url, $activity, [
|
||||||
'Content-Type' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
|
'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) {
|
yield function() use ($client, $url, $headers, $payload) {
|
||||||
return $client->postAsync($url, [
|
return $client->postAsync($url, [
|
||||||
|
|
|
@ -71,6 +71,7 @@ class AccountService
|
||||||
|
|
||||||
public static function del($id)
|
public static function del($id)
|
||||||
{
|
{
|
||||||
|
Cache::forget('pf:activitypub:user-object:by-id:' . $id);
|
||||||
return Cache::forget(self::CACHE_KEY . $id);
|
return Cache::forget(self::CACHE_KEY . $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue