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:
Mekan1206 committed 2026-08-16 17:28:19 +05:00
1 parent 57dd8ee378
commit 0cf106994f
5 files changed
+40 -4

No files matched your search

+4
View File
@@ -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;
}