Skip to content

Commit

Permalink
Fixed setIsDeletedByParticipant method in Thread entity
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien Pennequin committed Oct 18, 2011
1 parent 4a48a16 commit 0d50de3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Entity/Thread.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,11 @@ public function setIsDeletedByParticipant(ParticipantInterface $participant, $is
if ($meta = $this->getMetadataForParticipant($participant)) {
$meta->setIsDeleted($isDeleted);

// also mark all thread messages as read
foreach ($this->getMessages() as $message) {
$message->setIsReadByParticipant($participant, true);
if ($isDeleted) {
// also mark all thread messages as read
foreach ($this->getMessages() as $message) {
$message->setIsReadByParticipant($participant, true);
}
}
}
}
Expand Down

0 comments on commit 0d50de3

Please sign in to comment.