diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/conversation/ConversationGroupHandlerService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/conversation/ConversationGroupHandlerService.java index ba28c121f..5d12b3d97 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/conversation/ConversationGroupHandlerService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/conversation/ConversationGroupHandlerService.java @@ -351,7 +351,10 @@ public class ConversationGroupHandlerService { private ConversationGroup getPrivateConversation(Simulation simulation, SimulationMember member, String memberId) { SimulationMember communicator = simulation.getSimulationMemberById(memberId); ConversationGroup conversationGroup = simulation.getSimulationConversationGroupMap().values() - .stream().filter(group -> group.isPrivate() && group.contains(communicator)).findFirst().orElse(null); + .stream().filter(group -> { + int memberNumber = Objects.equals(member.getId(), memberId) ? 1 : 2; + return group.getMemberList().size() == memberNumber && group.isPrivate() && group.contains(communicator); + }).findFirst().orElse(null); if (conversationGroup == null) { Long groupId = simulation.getMaxConversationGroupId(); conversationGroup = new ConversationGroup(groupId, null, null, simulation.getCorrectSystemTime(),