diff --git a/src/main/java/org/poolc/api/conversation/dto/ConversationResponse.java b/src/main/java/org/poolc/api/conversation/dto/ConversationResponse.java index 49905a9b..a180acab 100644 --- a/src/main/java/org/poolc/api/conversation/dto/ConversationResponse.java +++ b/src/main/java/org/poolc/api/conversation/dto/ConversationResponse.java @@ -11,20 +11,16 @@ public class ConversationResponse { private String id; - private String starterLoginID; - private String otherLoginID; - private boolean starterAnonymous; - private boolean otherAnonymous; + private String starterName; + private String otherName; private MessageResponse lastMessage; protected ConversationResponse() {} - public static ConversationResponse of(Conversation conversation) { + public static ConversationResponse of(Conversation conversation, String starterName, String otherName) { ConversationResponse response = new ConversationResponse(); response.setId(conversation.getId()); - response.setStarterLoginID(conversation.getStarterLoginID()); - response.setOtherLoginID(conversation.getOtherLoginID()); - response.setStarterAnonymous(conversation.isStarterAnonymous()); - response.setOtherAnonymous(conversation.isOtherAnonymous()); + response.setStarterName(starterName); + response.setOtherName(otherName); if (conversation.getLastMessage() != null) response.setLastMessage(MessageResponse.of(conversation.getLastMessage())); return response; }