mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-27 07:23:17 +00:00
commit
91b7c043be
2 changed files with 12 additions and 9 deletions
|
@ -1435,13 +1435,15 @@ class ApiV1Controller extends Controller
|
|||
$limit = $request->input('limit') ?? 3;
|
||||
$user = $request->user();
|
||||
|
||||
$key = 'user:last_active_at:id:'.$user->id;
|
||||
$ttl = now()->addMinutes(5);
|
||||
Cache::remember($key, $ttl, function() use($user) {
|
||||
$user->last_active_at = now();
|
||||
$user->save();
|
||||
return;
|
||||
});
|
||||
if($user) {
|
||||
$key = 'user:last_active_at:id:'.$user->id;
|
||||
$ttl = now()->addMinutes(5);
|
||||
Cache::remember($key, $ttl, function() use($user) {
|
||||
$user->last_active_at = now();
|
||||
$user->save();
|
||||
return;
|
||||
});
|
||||
}
|
||||
|
||||
if($min || $max) {
|
||||
$dir = $min ? '>' : '<';
|
||||
|
|
|
@ -80,7 +80,8 @@ class InboxValidator implements ShouldQueue
|
|||
$headers,
|
||||
$payload,
|
||||
$actor,
|
||||
$hash
|
||||
$hash,
|
||||
$profile
|
||||
) {
|
||||
$key = 'ap:inbox:actor-delete-exists:' . $hash;
|
||||
$actorDelete = Cache::remember($key, now()->addMinutes(15), function() use($actor) {
|
||||
|
@ -89,7 +90,7 @@ class InboxValidator implements ShouldQueue
|
|||
->exists();
|
||||
});
|
||||
if($actorDelete) {
|
||||
if($this->verifySignature($headers, $payload) == true) {
|
||||
if($this->verifySignature($headers, $profile, $payload) == true) {
|
||||
Cache::set($key, false);
|
||||
$profile = Profile::whereNotNull('domain')
|
||||
->whereNull('status')
|
||||
|
|
Loading…
Reference in a new issue