diff --git a/client/src/App.tsx b/client/src/App.tsx index 86288cc..cdf2488 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -94,11 +94,11 @@ const LobbyView: React.FC = (props: LobbyProps) => { } break; case "error": - console.error(`Lobby - Server error: ${data.error}`); - setError(data.error); + console.error(`Lobby - Server error: ${data.data.error}`); + setError(data.data.error); // If the error is about lobby not found, reset the lobby state - if (data.error && data.error.includes("Lobby not found")) { + if (data.data.error && data.data.error.includes("Lobby not found")) { console.log("Lobby - Lobby not found error, clearing lobby state"); setLobby(null); setSocketUrl(null); diff --git a/voicebot/webrtc_signaling.py b/voicebot/webrtc_signaling.py index 9388fed..e51da56 100644 --- a/voicebot/webrtc_signaling.py +++ b/voicebot/webrtc_signaling.py @@ -641,6 +641,9 @@ class WebRTCSignalingClient: except ValidationError as e: logger.error(f"Invalid chat_message payload: {e}", exc_info=True) return + if validated.sender_session_id == self.session_id: + logger.debug("Ignoring chat message from ourselves") + return logger.info(f"Received chat message from {validated.sender_name}: {validated.message[:50]}...") # Call the callback if it's set if self.on_chat_message_received: