diff --git a/src/main/java/com/chat/yourway/mapper/BaseMapper.java b/src/main/java/com/chat/yourway/mapper/BaseMapper.java index b1b5d57..dafcdb0 100644 --- a/src/main/java/com/chat/yourway/mapper/BaseMapper.java +++ b/src/main/java/com/chat/yourway/mapper/BaseMapper.java @@ -4,7 +4,6 @@ import com.chat.yourway.dto.response.MessageResponseDto; import com.chat.yourway.dto.response.notification.LastMessageResponseDto; import com.chat.yourway.model.Contact; -import com.chat.yourway.model.Message; import com.chat.yourway.model.Topic; import com.chat.yourway.service.LastMessagesService; import lombok.RequiredArgsConstructor; @@ -14,7 +13,6 @@ import java.util.List; import java.util.Optional; -import java.util.Set; import java.util.stream.Collectors; @Named("BaseMapper") diff --git a/src/main/java/com/chat/yourway/service/TopicSubscriberService.java b/src/main/java/com/chat/yourway/service/TopicSubscriberService.java index d9827c4..fea5fe2 100644 --- a/src/main/java/com/chat/yourway/service/TopicSubscriberService.java +++ b/src/main/java/com/chat/yourway/service/TopicSubscriberService.java @@ -43,8 +43,7 @@ public void unsubscribeFromTopicById(UUID topicId) { } public List findAllSubscribersByTopicId(UUID id) { - Topic topic = topicService.getTopic(id); - return topic.getTopicSubscribers().stream() + return topicService.getTopic(id).getTopicSubscribers().stream() .map(contactMapper::toResponseDto) .toList(); }