diff --git a/src/main/java/com/catchroom/chat/global/pubsub/RedisPublisher.java b/src/main/java/com/catchroom/chat/global/pubsub/RedisPublisher.java index 513f1d7..a885238 100644 --- a/src/main/java/com/catchroom/chat/global/pubsub/RedisPublisher.java +++ b/src/main/java/com/catchroom/chat/global/pubsub/RedisPublisher.java @@ -1,6 +1,7 @@ package com.catchroom.chat.global.pubsub; import com.catchroom.chat.message.dto.ChatMessageDto; +import com.catchroom.chat.message.dto.MessageSubDto; import lombok.RequiredArgsConstructor; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.listener.ChannelTopic; @@ -12,7 +13,7 @@ public class RedisPublisher { private final ChannelTopic channelTopic; private final RedisTemplate redisTemplate; - public void publish(ChatMessageDto message) { + public void publish(MessageSubDto message) { redisTemplate.convertAndSend(channelTopic.getTopic(), message); } } diff --git a/src/main/java/com/catchroom/chat/message/service/ChatService.java b/src/main/java/com/catchroom/chat/message/service/ChatService.java index e35a467..09e8110 100644 --- a/src/main/java/com/catchroom/chat/message/service/ChatService.java +++ b/src/main/java/com/catchroom/chat/message/service/ChatService.java @@ -48,7 +48,7 @@ public void sendChatMessage(ChatMessageDto chatMessage, String accessToken) { .list(chatRoomListGetResponseList) .build(); - redisPublisher.publish(chatMessage); + redisPublisher.publish(messageSubDto); } }