rename message classes
This commit is contained in:
parent
509da5bb83
commit
7d97f49a2a
|
|
@ -6,7 +6,7 @@ use BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager;
|
|||
use Ratchet\ConnectionInterface;
|
||||
use stdClass;
|
||||
|
||||
class PusherMessage implements RespondableMessage
|
||||
class PusherChannelProtocolMessage implements RespondableMessage
|
||||
{
|
||||
/** @var \stdClass */
|
||||
protected $payload;
|
||||
|
|
@ -8,7 +8,7 @@ use BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager;
|
|||
use Ratchet\ConnectionInterface;
|
||||
use stdClass;
|
||||
|
||||
class Message implements RespondableMessage
|
||||
class PusherClientMessage implements RespondableMessage
|
||||
{
|
||||
/** \stdClass */
|
||||
protected $payload;
|
||||
|
|
@ -16,7 +16,7 @@ class RespondableMessageFactory
|
|||
$payload = json_decode($message->getPayload());
|
||||
|
||||
return starts_with($payload->event, 'pusher:')
|
||||
? new PusherMessage($payload, $connection, $channelManager)
|
||||
: new Message($payload, $connection, $channelManager);
|
||||
? new PusherChannelProtocolMessage($payload, $connection, $channelManager)
|
||||
: new PusherClientMessage($payload, $connection, $channelManager);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue