Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion config/musonza_chat.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions src/Eventing/MessageWasSent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

/**
Expand Down