Refactor broadcasting configuration and enhance chat authorization: update middleware in BroadcastServiceProvider, add support user check in ChatSupport, and improve chat.js for dynamic auth endpoint handling. Update channels.php to restrict access for support conversation.
This commit is contained in:
1 parent
57dd8ee378
commit
0cf106994f
5 files changed
+40
-4
No files matched your search
@@ -29,6 +29,10 @@
|
||||
});
|
||||
|
||||
Broadcast::channel('chat.{conversationId}', function ($user, $conversationId) {
|
||||
if ($conversationId === 'support') {
|
||||
return ChatSupport::isOperator($user);
|
||||
}
|
||||
|
||||
if (! ctype_digit((string) $conversationId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user