diff --git a/src/main/java/com/chat/yourway/service/TopicService.java b/src/main/java/com/chat/yourway/service/TopicService.java index ee37ae5..9239149 100644 --- a/src/main/java/com/chat/yourway/service/TopicService.java +++ b/src/main/java/com/chat/yourway/service/TopicService.java @@ -165,10 +165,6 @@ public List findTopicsByTopicName(String topicName) { return toListResponseDto(topicRepository.findAllByName(topicName), contactService.getCurrentContact()); } - private String generatePrivateName(String sendTo, String email) { - return UUID.randomUUID().toString(); - } - public List findAllFavouriteTopics() { Contact contact = contactService.getCurrentContact(); return toListInfoResponseDto(contact.getFavoriteTopics(), contact); @@ -185,7 +181,7 @@ public Topic getPrivateTopic(Contact sendToContact, Contact sendFromContact) { () -> { Topic newPrivateTopic = Topic.builder() .contact(sendToContact) - .name(generatePrivateName(sendToContact.getEmail(), sendFromContact.getEmail())) + .name(sendFromContact.getNickname()) .scope(TopicScope.PRIVATE) .topicSubscribers(List.of(sendToContact, sendFromContact)) .build();