Skip to content

Commit

Permalink
#109 내가 쓴 글에서 내가 댓글달 경우에도 알람이 가던 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
TaerryKim committed Sep 26, 2018
1 parent bd5cb41 commit 57b3d1b
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@ public class MeetingCommService extends MeetingBaseService{
public Comment createComment(Comment comment) throws InvalidMeetingException, IOException {
// 1. Check the target meeting to be valid
int meeting_seq = comment.getMeeting_seq();
MeetingDetail meetingDetail = meetingDetailMapper.detail(meeting_seq);

if (meetingDetailMapper.isExistMeetingDetail(meeting_seq)) {
commentMapper.insert(comment);
if (meetingDetail == null) {
throw new InvalidMeetingException();
}

MeetingDetail meetingDetail = meetingDetailMapper.detail(meeting_seq);
pushMessage(meetingDetail.getUser_id(), ADD_COMMENT_MSG);
commentMapper.insert(comment);

return comment;
}
else {
throw new InvalidMeetingException();
if(comment.getUser_id().compareTo(meetingDetail.getUser_id()) != 0){
pushMessage(meetingDetail.getUser_id(), ADD_COMMENT_MSG);
}

return comment;
}

public List<Comment> getCommentsByMeeting(int meeting_seq){
Expand Down

0 comments on commit 57b3d1b

Please sign in to comment.