1
0
Fork 0

Update StatusController, invalidate profile embed cache on status delete

This commit is contained in:
Daniel Supernault 2021-02-28 23:04:15 -07:00
parent 063558e3ac
commit 9c8a87c331
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 7 additions and 0 deletions

View File

@ -74,6 +74,12 @@ class StatusController extends Controller
}
$template = $status->in_reply_to_id ? 'status.reply' : 'status.show';
// $template = $status->type === 'video' &&
// $request->has('video_beta') &&
// $request->video_beta == 1 &&
// $request->user() ?
// 'status.show_video' : 'status.show';
return view($template, compact('user', 'status'));
}
@ -212,6 +218,7 @@ class StatusController extends Controller
Cache::forget('_api:statuses:recent_9:' . $status->profile_id);
Cache::forget('profile:status_count:' . $status->profile_id);
Cache::forget('profile:embed:' . $status->profile_id);
StatusService::del($status->id);
if ($status->profile_id == $user->profile->id || $user->is_admin == true) {
Cache::forget('profile:status_count:'.$status->profile_id);