Skip to content

Commit

Permalink
Merge pull request #86 from catchroom/feature/리팩토링-레디스-채팅방
Browse files Browse the repository at this point in the history
fix : 채팅방 정렬시 마지막 메시지 넣도록 수정
  • Loading branch information
sungjiwoon authored Jan 26, 2024
2 parents 5447f19 + e6e0261 commit b620ae9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
public class ChatRoomService {
private final MainFeignClient mainFeignClient;
private final ChatRoomRedisRepository chatRoomRedisRepository;
private final ChatMessageRepository chatMessageRepository;
private final ChatMongoService chatMongoService;

public ChatRoomListGetResponse getChatRoomInfo(String accessToken, String roomId) {
Expand All @@ -36,6 +35,7 @@ public ChatRoomListGetResponse getChatRoomInfo(String accessToken, String roomId
public List<ChatRoomListGetResponse> getChatRoomListByHttp(Long userId, String accessToken) {
// 처음 HTTP 요청에서는 무조건 레디스 초기화 진행하도록 로직 수정
List<ChatRoomListGetResponse> chatRoomListGetResponseList = mainFeignClient.getChatRoomList(accessToken);
chatRoomListGetResponseList.forEach(this::setListChatLastMessage);
chatRoomRedisRepository.initChatRoomList(userId, chatRoomListGetResponseList);
sortChatRoomListLatest(chatRoomListGetResponseList);
return chatRoomListGetResponseList;
Expand Down

0 comments on commit b620ae9

Please sign in to comment.