mirror of
https://github.com/tiennm99/BSK-All-in-One-Clinic-Management-System.git
synced 2026-10-13 00:14:01 +00:00
[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:
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");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user