mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Update UnfollowPipeline, fix follower count cache bug
This commit is contained in:
parent
858fcbf606
commit
6bdf73de4d
1 changed files with 88 additions and 87 deletions
|
@ -4,26 +4,25 @@ namespace App\Jobs\FollowPipeline;
|
|||
|
||||
use App\Follower;
|
||||
use App\FollowRequest;
|
||||
use App\Jobs\HomeFeedPipeline\FeedUnfollowPipeline;
|
||||
use App\Notification;
|
||||
use App\Profile;
|
||||
use App\Services\AccountService;
|
||||
use App\Services\FollowerService;
|
||||
use App\Services\NotificationService;
|
||||
use Cache;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Log;
|
||||
use Illuminate\Support\Facades\Redis;
|
||||
use App\Services\AccountService;
|
||||
use App\Services\FollowerService;
|
||||
use App\Services\NotificationService;
|
||||
use App\Jobs\HomeFeedPipeline\FeedUnfollowPipeline;
|
||||
|
||||
class UnfollowPipeline implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
protected $actor;
|
||||
|
||||
protected $target;
|
||||
|
||||
/**
|
||||
|
@ -112,6 +111,8 @@ class UnfollowPipeline implements ShouldQueue
|
|||
->whereFollowerId($actor)
|
||||
->delete();
|
||||
|
||||
return;
|
||||
AccountService::del($target);
|
||||
AccountService::del($actor);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue