Skip to content

Commit

Permalink
#108 fix : device token 없을 경우 APN 알림 안보냄
Browse files Browse the repository at this point in the history
  • Loading branch information
shinhn committed Mar 24, 2023
1 parent c902dc8 commit b57fd5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public ApplicationResponse<BoardUserRes> joinBoardUser(CreateBoardUserReq dto) {

// 호스트에게 멤버 참여 APN 푸쉬 알림
try {
if(user.getUserStatus().equals(UserStatus.LOGIN)) apnService.createBoardUserJoinAPN(new CreateBoardUserJoinAPNReq(board.getHost().getDeviceToken(), user.getName(), board.getId(), board.getTitle()));
if(user.getUserStatus().equals(UserStatus.LOGIN) && board.getHost().getDeviceToken() != null) apnService.createBoardUserJoinAPN(new CreateBoardUserJoinAPNReq(board.getHost().getDeviceToken(), user.getName(), board.getId(), board.getTitle()));
} catch (ExecutionException e) {
e.printStackTrace();
} catch (InterruptedException e) {
Expand Down Expand Up @@ -157,7 +157,7 @@ public ApplicationResponse<Void> delBoardUser(CreateBoardUserReq dto){

// 호스트에게 멤버 참여 취소 APN 푸쉬 알림
try {
if(user.getUserStatus().equals(UserStatus.LOGIN)) apnService.delBoardUserJoinAPN(new DelBoardUserJoinAPNReq(board.getHost().getDeviceToken(), user.getName(), board.getId(), board.getTitle()));
if(user.getUserStatus().equals(UserStatus.LOGIN) && board.getHost().getDeviceToken() != null) apnService.delBoardUserJoinAPN(new DelBoardUserJoinAPNReq(board.getHost().getDeviceToken(), user.getName(), board.getId(), board.getTitle()));
} catch (ExecutionException e) {
e.printStackTrace();
} catch (InterruptedException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public ApplicationResponse<ClipBoardRes> createClipBoard(CreateClipBoardReq dto)
if(boardUsers!=null){
for(BoardUser bu: boardUsers){
try {
if(user.getUserStatus().equals(UserStatus.LOGIN) && !user.equals(bu.getUser())) apnService.createClipBoardAPN(new CreateClipBoardAPNReq(bu.getUser().getDeviceToken(), user.getName(), board.getId(), board.getTitle()));
if(user.getUserStatus().equals(UserStatus.LOGIN) && !user.equals(bu.getUser()) && bu.getUser().getDeviceToken() != null) apnService.createClipBoardAPN(new CreateClipBoardAPNReq(bu.getUser().getDeviceToken(), user.getName(), board.getId(), board.getTitle()));
} catch (ExecutionException e) {
e.printStackTrace();
} catch (InterruptedException e) {
Expand Down

0 comments on commit b57fd5d

Please sign in to comment.