Skip to content

Commit

Permalink
Merge pull request #27 from catchroom/feat-roomList
Browse files Browse the repository at this point in the history
fix : 룸 정보 pub sub 추가
  • Loading branch information
HyemIin authored Jan 19, 2024
2 parents 8f54c60 + db379e7 commit b85affc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void sendChatMessage(ChatMessageDto chatMessage, String accessToken) {
.list(chatRoomListGetResponseList)
.build();

redisPublisher.publish(chatMessage);
redisPublisher.publish(messageSubDto);
}

}

0 comments on commit b85affc

Please sign in to comment.