Fixing reload and other issues

This commit is contained in:
James Ketr 2025-09-03 18:21:11 -07:00
parent bd5e5e4d8f
commit 2a2aa5a6c3
2 changed files with 6 additions and 3 deletions

View File

@ -94,11 +94,11 @@ const LobbyView: React.FC<LobbyProps> = (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);

View File

@ -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: