mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-09 21:50:45 +00:00
Update AccountService, fix actor cache invalidation
This commit is contained in:
parent
f443c1fad2
commit
498b46f70f
2 changed files with 4 additions and 2 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!');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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