mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-26 06:53:17 +00:00
Update ProfilePipeline
This commit is contained in:
parent
0eb51ed74d
commit
31afaba3d0
1 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue