Update ProfilePipeline

pull/4455/head
Daniel Supernault 2023-06-06 05:21:44 -06:00
rodzic 0eb51ed74d
commit 31afaba3d0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -11,6 +11,7 @@ use Illuminate\Queue\SerializesModels;
use App\Avatar;
use App\Profile;
use App\Util\ActivityPub\Helpers;
use Cache;
use Purify;
use App\Jobs\AvatarPipeline\RemoteAvatarFetch;
use App\Util\Lexer\Autolink;
@ -81,7 +82,12 @@ class HandleUpdateActivity implements ShouldQueue
$profile->save();
}
RemoteAvatarFetch::dispatch($profile)->onQueue('low');
if(isset($payload['object']['icon'])) {
RemoteAvatarFetch::dispatch($profile)->onQueue('low');
} else {
$profile->avatar->update(['remote_url' => null]);
Cache::forget('avatar:' . $profile->id);
}
return;
}