mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +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\Follower;
|
||||||
use App\FollowRequest;
|
use App\FollowRequest;
|
||||||
|
use App\Jobs\HomeFeedPipeline\FeedUnfollowPipeline;
|
||||||
use App\Notification;
|
use App\Notification;
|
||||||
use App\Profile;
|
use App\Profile;
|
||||||
|
use App\Services\AccountService;
|
||||||
|
use App\Services\FollowerService;
|
||||||
|
use App\Services\NotificationService;
|
||||||
use Cache;
|
use Cache;
|
||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
use Illuminate\Foundation\Bus\Dispatchable;
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
use Illuminate\Queue\SerializesModels;
|
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
|
class UnfollowPipeline implements ShouldQueue
|
||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
protected $actor;
|
protected $actor;
|
||||||
|
|
||||||
protected $target;
|
protected $target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -112,6 +111,8 @@ class UnfollowPipeline implements ShouldQueue
|
||||||
->whereFollowerId($actor)
|
->whereFollowerId($actor)
|
||||||
->delete();
|
->delete();
|
||||||
|
|
||||||
return;
|
AccountService::del($target);
|
||||||
|
AccountService::del($actor);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue