Skip to content
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] 채팅기능 #24

Merged
merged 31 commits into from
Jan 6, 2024
Merged

[feat] 채팅기능 #24

merged 31 commits into from
Jan 6, 2024

Conversation

OJOJIN
Copy link
Contributor

@OJOJIN OJOJIN commented Jan 5, 2024

Related Issue 🪢

Summary 🌿

저번주에 이슈 올려놓고 드디어 채팅 PR 올립니다.
끊을 타이밍이 마땅치않다는 핑계로 뭉텅이로 올려버렸습니다. 죄송합니다..

추가한 기능을 요약하면 다음과 같습니다.

  • StompInterceptor를 통한 유저 accessToken 검증

  • StompErrorHandler를 통해 Stomp 통신에서 발생한 예외처리

  • 채팅 전송기능

  • 채팅방 목록 조회 기능

  • 채팅방 내 이전 채팅 조회 기능

  • 채팅방 입장 기능 (따로 뺀 이유는 해당 부분에서 redis에 해당 채팅방에 유저가 접속하고 채팅방에서 유저가 읽지않은 메시지가 있을 때 모두 읽음 처리 해주어야 해서 입니다.)

아직 유저가 채팅방 삭제하는 기능은 추가하지 못했습니다. (있는걸 지금봤네요..)

Before i request PR review 🧤

모든 코드를 확인하기엔 무리라고 생각해서 아래 위주로 봐주시면 감사하겠습니다.

  • StompInterceptor 부분
  • UserQuerydslRepository에서 유저가 가장 최근에 올린 게시물을 가져오게 해놨는데 괜찮을지
  • ChatService 전체적 흐름

이외에도 각종 궁금증 및 이거 왜 이렇게함? 및 이게 더 좋을 듯 등 피드백 주시면 감사하겠습니다.

@ziiyouth ziiyouth self-assigned this Jan 5, 2024
@ziiyouth ziiyouth added the FEAT 새로운 기능을 추가 label Jan 5, 2024
Copy link
Member

@ziiyouth ziiyouth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다 🥹👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

엔티티랑 메소드 주석 자세해서 좋네욤 감사링링

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

상대방의 글이 없을 때..? 일단은 findUserChatRoomListInfo 에서 null로 갈 거 같은데 예외처리 해줘도 괜찮울듯

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

엥 머야 하나 확인 안 누르고 남겼다;; 추후에 개발하실 채팅방 삭제 기능에서 분기 처리 (한 명만 나가게 된다면 그 전의 기록을 한 명만 못 보게 삭제할건지, 해당 유저가 다시 상대편 유저에게 채팅을 건다면 앞선 그 기록이 다 보이게 하는지 등),, 도 궁금해여

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

안그래도 고민하고있었어서 어떻게 할지 정해봐요

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

상대방의 글이 없을 때..? 일단은 findUserChatRoomListInfo 에서 null로 갈 거 같은데 예외처리 해줘도 괜찮울듯

상대 글이 없을때도 채팅 내용이 불러져야한다고 생각해서 일부로 null을 넣어 내용을 보내주었습니다

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

상대방의 글이 없을 때..? 일단은 findUserChatRoomListInfo 에서 null로 갈 거 같은데 예외처리 해줘도 괜찮울듯

상대 글이 없을때도 채팅 내용이 불러져야한다고 생각해서 일부로 null을 넣어 내용을 보내주었습니다

호~ 생각해보니 그게 맞다 트리플 인정드립니다

@ziiyouth ziiyouth assigned OJOJIN and unassigned ziiyouth Jan 5, 2024
Copy link
Contributor

@RyuKwanKon RyuKwanKon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

따따봉 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

혹시 기존 서비스에 있는 jwt provider랑 같은 기능을 하는 것 같은데 별도로 socket jwt provider가 존재하는 이유가따로 있을까요???

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

기존 jwt provider는 예외로 BusinessException를 발생시켰지만 Socket으로 통신할 때에는 MessageDeliveryException를 상속받은 SocketException 예외를 발생시켜야해 예외처리하는 부분만 바꾼 socket jwt provider를 만들었습니다!

@OJOJIN OJOJIN merged commit a72b8d4 into develop Jan 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FEAT 새로운 기능을 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] 채팅기능
3 participants