public function addMessage(MessageInterface $message)
 {
     parent::addMessage($message);
     $this->sortDenormalizedProperties();
 }
예제 #2
0
 /**
  * Ensures that metadata exists for each thread participant and that the
  * last message dates are current
  *
  * @param Thread $thread
  */
 protected function doEnsureThreadMetadataExists(Thread $thread)
 {
     foreach ($thread->getParticipants() as $participant) {
         if (!($meta = $thread->getMetadataForParticipant($participant))) {
             $meta = $this->createThreadMetadata();
             $meta->setParticipant($participant);
             $thread->addMetadata($meta);
         }
     }
 }