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

[FIX]isPushAlarmAllowed관련 null이슈 해결 #230

Merged
merged 1 commit into from
May 22, 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 @@ -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
Loading