-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat #149] 채팅 요청 수락 시 채팅 요청 메시지를 채팅방 메시지에 저장 #150
Merged
+77
−22
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6a88552
[refactor] : 멤버 비교에 equals 오버라이딩 메서드 사용
hyun2371 b1333c4
[feat] : 채팅, 채팅 요청 에러코드 분리
hyun2371 f0fcc84
[feat] : 채팅, 채팅 요청 에러코드 분리->서비스 코드 반영
hyun2371 3dff7b9
[feat] : 채팅, 채팅 요청 에러코드 분리->엔티티 코드 반영
hyun2371 f743c86
[feat] : 채팅방 생성 시 기존 요청 메시지 -> 채팅 메시지에 저장
hyun2371 d5eacdb
[test] : 채팅방 생성 시 기존 요청 메시지 -> 채팅 메시지에 저장 (테스트 반영)
hyun2371 cca8e31
[refactor] : 채팅 요청 조회 메서드명 수정
hyun2371 aecec2a
[style] : 코드 리포멧팅
hyun2371 3501801
[refactor] : error 메시지 수정
hyun2371 be2e6b0
[fix] : error 메시지 오류 수정
hyun2371 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/com/dnd/gongmuin/chat_inquiry/exception/ChatInquiryErrorCode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.dnd.gongmuin.chat_inquiry.exception; | ||
|
||
import com.dnd.gongmuin.common.exception.ErrorCode; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public enum ChatInquiryErrorCode implements ErrorCode { | ||
|
||
NOT_FOUND_INQUIRY("해당 아이디의 채팅 요청이 존재하지 않습니다.", "CI_001"), | ||
UNAUTHORIZED_REQUEST("채팅 요청을 수락을 하거나 거절할 권한이 없습니다.", "CI_002"), | ||
UNABLE_TO_CHANGE_STATUS("이미 수락했거나 거절한 요청입니다.", "CI_003"), | ||
NOT_FOUND_STATUS("채팅방 상태값을 올바르게 입력해주세요.", "CI_004"); | ||
|
||
private final String message; | ||
private final String code; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,9 +103,10 @@ private ChatRoom getChatRoomById(Long id) { | |
} | ||
|
||
private Member getChatPartner(Member member, ChatRoom chatRoom) { | ||
if (member.isEqualMember(chatRoom.getAnswerer().getId())) { | ||
if (member.equals(chatRoom.getAnswerer())) { | ||
return chatRoom.getInquirer(); | ||
} else if (member.isEqualMember(chatRoom.getInquirer().getId())) { | ||
} | ||
if (member.equals(chatRoom.getInquirer())) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 반영 감사합니다~!! |
||
return chatRoom.getAnswerer(); | ||
} | ||
throw new ValidationException(ChatErrorCode.UNAUTHORIZED_CHAT_ROOM); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
음..시간이 지나 자동 거절 되었을 때 알람을 안보내도 될까요?
조금 애매하군요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
알림이 있는게 더 자연스러울 것 같아요~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
음..넵 한번 추가해보겠습니다!