Update SharePipeline, add Undo->Announce support
This commit is contained in:
parent
f1208de0ef
commit
c8e40e0fd3
4 changed files with 137 additions and 17 deletions
|
@ -6,6 +6,7 @@ use App\Jobs\ImageOptimizePipeline\ImageOptimize;
|
|||
use App\Jobs\StatusPipeline\NewStatusPipeline;
|
||||
use App\Jobs\StatusPipeline\StatusDelete;
|
||||
use App\Jobs\SharePipeline\SharePipeline;
|
||||
use App\Jobs\SharePipeline\UndoSharePipeline;
|
||||
use App\AccountInterstitial;
|
||||
use App\Media;
|
||||
use App\Profile;
|
||||
|
@ -250,7 +251,7 @@ class StatusController extends Controller
|
|||
->whereReblogOfId($status->id)
|
||||
->get();
|
||||
foreach ($shares as $share) {
|
||||
$share->delete();
|
||||
UndoSharePipeline::dispatch($share);
|
||||
$count--;
|
||||
}
|
||||
} else {
|
||||
|
@ -263,11 +264,6 @@ class StatusController extends Controller
|
|||
SharePipeline::dispatch($share);
|
||||
}
|
||||
|
||||
if($count >= 0) {
|
||||
$status->reblogs_count = $count;
|
||||
$status->save();
|
||||
}
|
||||
|
||||
Cache::forget('status:'.$status->id.':sharedby:userid:'.$user->id);
|
||||
StatusService::del($status->id);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue