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

DM 기능 구현 #25

Merged
merged 4 commits into from
Jan 21, 2025
Merged

DM 기능 구현 #25

merged 4 commits into from
Jan 21, 2025

Conversation

MunJaeyoung
Copy link
Collaborator

토큰으로 인증받고 /api/dm 경로로 websocket에 연결할 수 있습니다.
[GET] /api/dm/message/{message_id} - 메세지의 정보를 반환합니다.
[GET] /api/dm/sent - 사용자가 보낸 메세지를 반환합니다.
[GET] /api/dm/received - 사용자가 받은 메세지를 반환합니다.
[DELETE] /api/dm/{message_id} - 메세지를 삭제합니다.

websocket에 연결해서 서로 메세지를 주고 받을 수 있고, 주고 받은 메세지는 db에 저장되도록 구현했습니다.

@cloNoey
Copy link
Collaborator

cloNoey commented Jan 21, 2025

수고하셨습니다! 예외 처리도 잘 되어 있고, 잘 작동하네요!

  • 지금 user_id랑 receiver_id가 같을 때도 메세지가 보내지고 있는데, 이걸 제한해야 할지 아니면 카카오톡처럼 나에게 보내기를 구현하는 방향으로 갈지 이야기 나눠보면 좋을 것 같아요! 당장 중요해보이지는 않아서, 머지하셔도 될 것 같고, 그냥 하나의 의견으로 코멘트 남깁니다 :)

@b1lly13 b1lly13 self-requested a review January 21, 2025 07:10
Copy link
Collaborator

@b1lly13 b1lly13 left a comment

Choose a reason for hiding this comment

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

보내는 것, 지우는 것, 받은 디엠 확인하는 것, 에러 뜨는 것 다 잘 구현된 것 같습니다. 승연님이 말씀하신 것 처럼 본인한테도 DM을 보낼 수 있는데, 제 생각엔 그냥 이렇게 냅두어도 괜찮을 것 같아요.

수고하셨습니다!

@MunJaeyoung MunJaeyoung merged commit e8a8718 into main Jan 21, 2025
@MunJaeyoung MunJaeyoung deleted the feature/dm branch January 25, 2025 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants