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

[BE] release v1.0.0 -> develop 병합 #729

Merged
merged 6 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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));
}
}
Loading