This commit is contained in:
Marcel Pociot 2018-11-24 00:15:18 +01:00
parent f8008ea95e
commit e6b22dc36f
2 changed files with 0 additions and 28 deletions

View File

@ -30,10 +30,6 @@ class ChannelManager
protected function detectChannelClass($channelId): string protected function detectChannelClass($channelId): string
{ {
if (starts_with($channelId, 'logging-')) {
return LoggingChannel::class;
}
if (starts_with($channelId, 'private-')) { if (starts_with($channelId, 'private-')) {
return PrivateChannel::class; return PrivateChannel::class;
} }

View File

@ -1,24 +0,0 @@
<?php
namespace BeyondCode\LaravelWebSockets\LaravelEcho\Pusher\Channels;
use BeyondCode\LaravelWebSockets\LaravelEcho\Pusher\Exceptions\InvalidConnectionException;
use stdClass;
use Ratchet\ConnectionInterface;
class LoggingChannel extends Channel
{
public function subscribe(ConnectionInterface $connection, stdClass $payload)
{
$this->verifySignature($connection, $payload);
$this->verifyAdministrator($connection);
parent::subscribe($connection, $payload);
}
protected function verifyAdministrator(ConnectionInterface $connection)
{
throw_unless($connection->isAdmin, new InvalidConnectionException());
}
}