Skip to content

Commit

Permalink
add control to check if user is notified #2294
Browse files Browse the repository at this point in the history
  • Loading branch information
emilschn committed Mar 12, 2024
1 parent cbf83ac commit 881539f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EventListener/ActivityListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ private function isUserNotified($user, $entity): bool
// - if entity is Suivi: we check that the partner of the user is different from the partner of the user who created the suivi
return User::STATUS_ACTIVE === $user->getStatut()
&& !$user->isSuperAdmin() && !$user->isTerritoryAdmin()
&& ($entity instanceof Affectation || $user->getPartner() !== $entity->getCreatedBy()->getPartner());
&& ($entity instanceof Affectation || ($entity->getCreatedBy() && $user->getPartner() !== $entity->getCreatedBy()->getPartner()));
}

public function preRemove(LifecycleEventArgs $args)
Expand Down

0 comments on commit 881539f

Please sign in to comment.