plugin/message/Serializer/MessageSerializer.php
private function getUserMessages(Message $message)
    {
        $currentUser = $this->tokenStorage->getToken()->getUser();

        return $this->om->getRepository(UserMessage::class)->findBy(['message' => $message, 'user' => $currentUser]);
    }
private function getUserMessages(Message $message)
    {
        $currentUser = $this->tokenStorage->getToken()->getUser();

        return $this->om->getRepository(UserMessage::class)->findBy(['message' => $message, 'user' => $currentUser]);
    }
private function getUserMessages ( Message $ message ) { $ currentUser = $ this -> tokenStorage -> getToken ( ) -> getUser ( ) ; return $ this -> om -> getRepository ( UserMessage :: class ) -> findBy ( [ 'message' => $ message , 'user' => $ currentUser ] ) ; }
we return an array for backward compatibity. It used to create many messages for a single user.
we return an array for backward compatibity . It used to create many messages for a single user .