Fix chat message and photo sending
- Remove broken transformRequest that crashed with Axios 1.x (headers.post undefined) - Guard window.Echo.socketId() to avoid TypeError before socket connects - Wrap broadcast() in try/catch so Reverb downtime does not cause 500 errors Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -99,7 +99,11 @@ class ChatController extends Controller
|
||||
|
||||
$message->load('sender');
|
||||
|
||||
broadcast(new MessageSent($message))->toOthers();
|
||||
try {
|
||||
broadcast(new MessageSent($message))->toOthers();
|
||||
} catch (\Exception $e) {
|
||||
\Log::warning('Chat broadcast failed: ' . $e->getMessage());
|
||||
}
|
||||
|
||||
$message->created_at = $message->created_at->format('H:i');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user