Add ReblogService, improve reblogged state for api entities
This commit is contained in:
parent
a7d715517d
commit
6cfd6be523
5 changed files with 50 additions and 7 deletions
|
@ -25,6 +25,7 @@ use Illuminate\Support\Str;
|
|||
use App\Services\HashidService;
|
||||
use App\Services\StatusService;
|
||||
use App\Util\Media\License;
|
||||
use App\Services\ReblogService;
|
||||
|
||||
class StatusController extends Controller
|
||||
{
|
||||
|
@ -245,6 +246,7 @@ class StatusController extends Controller
|
|||
->get();
|
||||
foreach ($shares as $share) {
|
||||
UndoSharePipeline::dispatch($share);
|
||||
ReblogService::del($profile->id, $status->id);
|
||||
$count--;
|
||||
}
|
||||
} else {
|
||||
|
@ -255,6 +257,7 @@ class StatusController extends Controller
|
|||
$share->save();
|
||||
$count++;
|
||||
SharePipeline::dispatch($share);
|
||||
ReblogService::add($profile->id, $status->id);
|
||||
}
|
||||
|
||||
Cache::forget('status:'.$status->id.':sharedby:userid:'.$user->id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue