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:
2026-05-11 02:02:31 -06:00
parent f54acb8675
commit 0df6c38784
2 changed files with 11 additions and 9 deletions
+5 -1
View File
@@ -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');