diff --git a/src/Skobkin/Bundle/PointToolsBundle/DTO/Api/WebSocket/Message.php b/src/Skobkin/Bundle/PointToolsBundle/DTO/Api/WebSocket/Message.php index ba2ee4d..6cd6229 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/DTO/Api/WebSocket/Message.php +++ b/src/Skobkin/Bundle/PointToolsBundle/DTO/Api/WebSocket/Message.php @@ -12,7 +12,7 @@ class Message implements ValidableInterface { public const TYPE_COMMENT = 'comment'; public const TYPE_POST = 'post'; - public const TYPE_POST_RECOMMENDATION = 'rec'; + public const TYPE_POST_COMMENT_RECOMMENDATION = 'rec'; public const TYPE_COMMENT_RECOMMENDATION = 'ok'; /** @@ -187,6 +187,17 @@ class Message implements ValidableInterface } break; + case self::TYPE_POST_COMMENT_RECOMMENDATION; + if ( + null !== $this->author && + null !== $this->authorId && + null !== $this->postId && + null !== $this->postAuthorId + ) { + return true; + } + break; + case null: throw new \RuntimeException('Message has NULL type.'); break;