Skip to content

Commit

Permalink
[BE] release v1.0.0 -> develop 병합 (#729)
Browse files Browse the repository at this point in the history
  • Loading branch information
takoyakimchi authored Nov 4, 2024
1 parent 262495f commit 090ea57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
@RestController
@RequestMapping("/auth")
public class AuthController {

// TODO: KakaoMemberService와 AuthService 통합
private final KakaoMemberService kakaoMemberService;
private final AuthService authService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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));
}
}

0 comments on commit 090ea57

Please sign in to comment.