rename message classes

This commit is contained in:
freek 2018-12-01 14:56:16 +01:00
parent 509da5bb83
commit 7d97f49a2a
3 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@ use BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager;
use Ratchet\ConnectionInterface; use Ratchet\ConnectionInterface;
use stdClass; use stdClass;
class PusherMessage implements RespondableMessage class PusherChannelProtocolMessage implements RespondableMessage
{ {
/** @var \stdClass */ /** @var \stdClass */
protected $payload; protected $payload;

View File

@ -8,7 +8,7 @@ use BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager;
use Ratchet\ConnectionInterface; use Ratchet\ConnectionInterface;
use stdClass; use stdClass;
class Message implements RespondableMessage class PusherClientMessage implements RespondableMessage
{ {
/** \stdClass */ /** \stdClass */
protected $payload; protected $payload;

View File

@ -16,7 +16,7 @@ class RespondableMessageFactory
$payload = json_decode($message->getPayload()); $payload = json_decode($message->getPayload());
return starts_with($payload->event, 'pusher:') return starts_with($payload->event, 'pusher:')
? new PusherMessage($payload, $connection, $channelManager) ? new PusherChannelProtocolMessage($payload, $connection, $channelManager)
: new Message($payload, $connection, $channelManager); : new PusherClientMessage($payload, $connection, $channelManager);
} }
} }