From e016aab7675d050dd362e001ecea69bae4956b03 Mon Sep 17 00:00:00 2001 From: weizhihong Date: Wed, 24 May 2023 10:07:07 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=94=A8=E6=88=B7=E7=BB=99=E8=87=AA?= =?UTF-8?q?=E5=B7=B1=E5=8F=91=E9=80=81=E6=B6=88=E6=81=AF=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=8F=91=E9=94=99=E4=BC=9A=E8=AF=9D=E7=BB=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cbtc/conversation/ConversationGroupHandlerService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(),