Skip to content

Commit

Permalink
hotfix: 새로운 채팅 생성 오류 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
aeyongdodam committed Mar 10, 2024
1 parent 6ffb697 commit ae2fac5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ public void updateConsultIsPaid(Long consultId) {
consult.updateIsPaidAndLetter(letter);
}
case CHAT -> {
Chat chat = chatService.createChat(consult);

consult.updateIsPaidAndChat(chat);
chatService.createChat(consult);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.util.Map;

public interface ChatService {
Chat createChat(Consult consult);
void createChat(Consult consult);

Chat getChatByChatId(Long chatId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,17 @@ public class ChatServiceImpl implements ChatService {
private final ChatNoticeService chatNoticeService;

@Override
public Chat createChat(Consult consult) {
public void createChat(Consult consult) {
Chat chat = Chat.newInstance();
chatRepository.save(chat);

consult.updateIsPaidAndChat(chat);

updateChatIdsRedis(chat, consult);

notifyNewChat(chat, consult);

chatTaskScheduler.checkAutoRefund(chat);
return chat;
}

@Override
Expand Down

0 comments on commit ae2fac5

Please sign in to comment.