Skip to content

Commit

Permalink
Merge pull request #230 from TeamDon-tBe/fix/#229
Browse files Browse the repository at this point in the history
[FIX]isPushAlarmAllowed관련 null이슈 해결
  • Loading branch information
Hong0329 authored May 22, 2024
2 parents 99c7dfd + 57670d5 commit 844e9ad
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public AuthResponseDto socialLogin(String socialAccessToken, AuthRequestDto auth
String accessToken = jwtTokenProvider.generateAccessToken(authentication);
member.updateRefreshToken(refreshToken);

return AuthResponseDto.of(member.getNickname(), member.getId(), accessToken, refreshToken, member.getProfileUrl(), true, member.isPushAlarmAllowed());
return AuthResponseDto.of(member.getNickname(), member.getId(), accessToken, refreshToken, member.getProfileUrl(), true, member.getIsPushAlarmAllowed());

}
else {
Expand All @@ -91,7 +91,7 @@ public AuthResponseDto socialLogin(String socialAccessToken, AuthRequestDto auth

String accessToken = jwtTokenProvider.generateAccessToken(authentication);

return AuthResponseDto.of(signedMember.getNickname(), signedMember.getId(), accessToken, refreshToken, signedMember.getProfileUrl(), false, signedMember.isPushAlarmAllowed());
return AuthResponseDto.of(signedMember.getNickname(), signedMember.getId(), accessToken, refreshToken, signedMember.getProfileUrl(), false, signedMember.getIsPushAlarmAllowed());
}
} catch (IllegalArgumentException ex) {
throw new IllegalArgumentException(ErrorStatus.ANOTHER_ACCESS_TOKEN.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void postCommentVer2(Long memberId, Long contentId, MultipartFile comment
Notification savedNotification = notificationRepository.save(notification);
}

if(contentWritingMember.isPushAlarmAllowed()) {
if(Boolean.TRUE.equals(contentWritingMember.getIsPushAlarmAllowed())) {
String FcmMessageTitle = usingMember.getNickname() + "님이 답글을 작성했습니다.";

FcmMessageDto commentFcmMessage = FcmMessageDto.builder()
Expand Down Expand Up @@ -179,7 +179,7 @@ public void likeComment(Long memberId, Long commentId, CommentLikedRequestDto co
Notification savedNotification = notificationRepository.save(notification);
}

if(targetMember.isPushAlarmAllowed()) {
if(Boolean.TRUE.equals(targetMember.getIsPushAlarmAllowed())) {
String FcmMessageTitle = triggerMember.getNickname() + "님이" + targetMember.getNickname() + "님의 답글을 좋아합니다.";

FcmMessageDto commentLikeFcmMessage = FcmMessageDto.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void likeContent(Long memberId, Long contentId, ContentLikedRequestDto co
Notification savedNotification = notificationRepository.save(notification);
}

if(targetMember.isPushAlarmAllowed()) {
if(Boolean.TRUE.equals(targetMember.getIsPushAlarmAllowed())) {
String FcmMessageTitle = triggerMember.getNickname() + "님이" + targetMember.getNickname() + "님의 글을 좋아합니다.";

FcmMessageDto contentLikeFcmMessage = FcmMessageDto.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class Member extends BaseTimeEntity {
private boolean isAlarmAllowed;

@Column(name = "is_push_alarm_allowed")
private boolean isPushAlarmAllowed;
private Boolean isPushAlarmAllowed;

@Column(name = "fcm_token")
private String fcmToken;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void popularContentNotification() {
.build();
Notification savedPopularWriterNotification = notificationRepository.save(popularWriterNotification);

if(topContentWriter.isPushAlarmAllowed()) {
if(Boolean.TRUE.equals(topContentWriter.getIsPushAlarmAllowed())) {
String FcmMessageTitle = topContentWriter.getNickname() + "님이 작성하신 글이 인기들로 선정 되었어요.";

FcmMessageDto popularContentFcmMessage = FcmMessageDto.builder()
Expand Down

0 comments on commit 844e9ad

Please sign in to comment.