Ajout invalidation cache notifications dans hook file-update
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
bb71da081b
commit
2791bc4462
1 changed files with 4 additions and 2 deletions
|
|
@ -3,7 +3,9 @@
|
||||||
// file.update:after
|
// file.update:after
|
||||||
return function ($newFile, $oldFile) {
|
return function ($newFile, $oldFile) {
|
||||||
$project = $newFile->parent()->template() == 'project' ? $newFile->parent() : $newFile->parent()->parents()->findBy('template', 'project');
|
$project = $newFile->parent()->template() == 'project' ? $newFile->parent() : $newFile->parent()->parents()->findBy('template', 'project');
|
||||||
if ($project) {
|
if ($project) {
|
||||||
$steps = $project->rebuildStepsCache();
|
$project->rebuildStepsCache();
|
||||||
|
// Invalider aussi le cache des notifications (commentaires sur fichiers, etc.)
|
||||||
|
$project->invalidateNotificationsCache();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue