From 16489b509e2a248093f6bb3a3726aec3f5528281 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Mon, 25 Feb 2019 19:00:36 +0300 Subject: [PATCH] Message::$postAuthorId added. --- .../PointToolsBundle/DTO/Api/WebSocket/Message.php | 12 +++++++++++- .../config/serializer/DTO.Api.WebSocket.Message.yml | 3 +++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Skobkin/Bundle/PointToolsBundle/DTO/Api/WebSocket/Message.php b/src/Skobkin/Bundle/PointToolsBundle/DTO/Api/WebSocket/Message.php index b00cfc0..ba2ee4d 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/DTO/Api/WebSocket/Message.php +++ b/src/Skobkin/Bundle/PointToolsBundle/DTO/Api/WebSocket/Message.php @@ -68,6 +68,11 @@ class Message implements ValidableInterface */ private $link; + /** + * @var int|null + */ + private $postAuthorId; + /** @var string */ private $postId; @@ -136,7 +141,7 @@ class Message implements ValidableInterface public function isPostRecommendation(): bool { - return self::TYPE_POST_RECOMMENDATION === $this->a; + return self::TYPE_POST_COMMENT_RECOMMENDATION === $this->a; } /** @@ -243,6 +248,11 @@ class Message implements ValidableInterface return $this->postId; } + public function getPostAuthorId(): ?int + { + return $this->postAuthorId; + } + public function getPrivate(): ?bool { return $this->private; diff --git a/src/Skobkin/Bundle/PointToolsBundle/Resources/config/serializer/DTO.Api.WebSocket.Message.yml b/src/Skobkin/Bundle/PointToolsBundle/Resources/config/serializer/DTO.Api.WebSocket.Message.yml index 8326072..e36322a 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Resources/config/serializer/DTO.Api.WebSocket.Message.yml +++ b/src/Skobkin/Bundle/PointToolsBundle/Resources/config/serializer/DTO.Api.WebSocket.Message.yml @@ -31,6 +31,9 @@ Skobkin\Bundle\PointToolsBundle\DTO\Api\WebSocket\Message: postId: type: string serialized_name: 'post_id' + postAuthorId: + type: int + serialized_name: 'post_author_id' private: type: bool serialized_name: 'private'