diff --git a/config/musonza_chat.php b/config/musonza_chat.php index c1e660e..5d43195 100755 --- a/config/musonza_chat.php +++ b/config/musonza_chat.php @@ -7,7 +7,9 @@ * Channel: mc-chat-conversation.2, * Event: Musonza\Chat\Eventing\MessageWasSent */ - 'broadcasts' => false, + 'broadcasts' => false, + 'broadcast_connection' => 'sync', + 'broadcast_queue' => 'default', /* * Specify the fields that you want to return each time for the sender. diff --git a/src/Eventing/MessageWasSent.php b/src/Eventing/MessageWasSent.php index 6de2cfb..7c60fe6 100644 --- a/src/Eventing/MessageWasSent.php +++ b/src/Eventing/MessageWasSent.php @@ -16,10 +16,14 @@ class MessageWasSent extends Event implements ShouldBroadcast use InteractsWithSockets; use SerializesModels; public $message; + public $connection; + public $queue; public function __construct(Message $message) { $this->message = $message; + $this->connection = config('musonza_chat.broadcast_connection', 'sync'); + $this->queue = config('musonza_chat.broadcast_queue', 'default'); } /**