[update] Implement chat message handling in NavBar and enhance LocalStorage. Add chat history storage and notification for incoming messages. Introduce a new drive button in CheckUpPage for patient document access, improving user interaction and data management capabilities.

This commit is contained in:
Lê Thành Đạt committed 2025-07-31 01:07:22 +07:00
1 parent 693ad5479c
commit 8e44c2a49c
12 files changed
+1316 -112

No files matched your search

@@ -1511,6 +1511,15 @@ public class ServerHandler extends SimpleChannelInboundHandler<TextWebSocketFram
log.error("Error processing GetCheckupDataRequest", e);
}
}
if (packet instanceof SimpleMessageRequest simpleMessageRequest) {
log.info("Received SimpleMessageRequest from {}", simpleMessageRequest.getSenderName());
SimpleMessageResponse response = new SimpleMessageResponse(simpleMessageRequest.getSenderName(), simpleMessageRequest.getMessage());
int maxCurId = SessionManager.getMaxSessionId();
for (int sessionId = 1; sessionId <= maxCurId; sessionId++) {
UserUtil.sendPacket(sessionId, response);
}
log.info("Sent SimpleMessageResponse to all sessions");
}
}
}