From 090ea57c1b3ca403234b703ed3e1b249b15986c7 Mon Sep 17 00:00:00 2001 From: TRE <37261785+takoyakimchi@users.noreply.github.com> Date: Mon, 4 Nov 2024 14:59:38 +0900 Subject: [PATCH] =?UTF-8?q?[BE]=20release=20v1.0.0=20->=20develop=20?= =?UTF-8?q?=EB=B3=91=ED=95=A9=20(#729)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../auth/controller/AuthController.java | 1 - .../chat/service/ChatCommandService.java | 15 ++++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/src/main/java/com/happy/friendogly/auth/controller/AuthController.java b/backend/src/main/java/com/happy/friendogly/auth/controller/AuthController.java index a2dcdff64..398a46a3d 100644 --- a/backend/src/main/java/com/happy/friendogly/auth/controller/AuthController.java +++ b/backend/src/main/java/com/happy/friendogly/auth/controller/AuthController.java @@ -18,7 +18,6 @@ @RestController @RequestMapping("/auth") public class AuthController { - // TODO: KakaoMemberService와 AuthService 통합 private final KakaoMemberService kakaoMemberService; private final AuthService authService; diff --git a/backend/src/main/java/com/happy/friendogly/chat/service/ChatCommandService.java b/backend/src/main/java/com/happy/friendogly/chat/service/ChatCommandService.java index 67290f50e..43e52c6e2 100644 --- a/backend/src/main/java/com/happy/friendogly/chat/service/ChatCommandService.java +++ b/backend/src/main/java/com/happy/friendogly/chat/service/ChatCommandService.java @@ -29,26 +29,26 @@ public class ChatCommandService { private static final String EMPTY_CONTENT = ""; private final MemberRepository memberRepository; + private final ClubRepository clubRepository; private final ChatRoomRepository chatRoomRepository; private final ChatMessageRepository chatMessageRepository; - private final ClubRepository clubRepository; private final NotificationService notificationService; - private final ChatTemplate chatTemplate; + private final ChatTemplate template; public ChatCommandService( MemberRepository memberRepository, + ClubRepository clubRepository, ChatRoomRepository chatRoomRepository, ChatMessageRepository chatMessageRepository, - ClubRepository clubRepository, NotificationService notificationService, - ChatTemplate chatTemplate + ChatTemplate template ) { this.memberRepository = memberRepository; + this.clubRepository = clubRepository; this.chatRoomRepository = chatRoomRepository; this.chatMessageRepository = chatMessageRepository; - this.clubRepository = clubRepository; this.notificationService = notificationService; - this.chatTemplate = chatTemplate; + this.template = template; } public void sendEnter(Long senderMemberId, Long chatRoomId) { @@ -78,8 +78,9 @@ private void sendAndSave(MessageType messageType, String content, ChatRoom chatR ChatMessageSocketResponse chat = new ChatMessageSocketResponse( messageType, content, senderMember, LocalDateTime.now()); Club club = clubRepository.getByChatRoomId(chatRoom.getId()); + notificationService.sendChatNotification(chatRoom.getId(), chat, club); - chatTemplate.convertAndSend(chatRoom.getId(), chat); + template.convertAndSend(chatRoom.getId(), chat); chatMessageRepository.save(new ChatMessage(chatRoom, messageType, senderMember, content)); } }