diff --git a/backend/src/main/java/com/twtw/backend/domain/friend/entity/Friend.java b/backend/src/main/java/com/twtw/backend/domain/friend/entity/Friend.java index da01fd3f..7e036b7a 100644 --- a/backend/src/main/java/com/twtw/backend/domain/friend/entity/Friend.java +++ b/backend/src/main/java/com/twtw/backend/domain/friend/entity/Friend.java @@ -98,7 +98,7 @@ public void checkExpire() { } private boolean isRequestNotExpired() { - return this.friendStatus == FriendStatus.REQUESTED - && this.baseTime.getCreatedAt().isAfter(LocalDateTime.now().minusMinutes(30L)); + return this.baseTime == null || (this.friendStatus == FriendStatus.REQUESTED + && this.baseTime.getCreatedAt().isAfter(LocalDateTime.now().minusMinutes(30L))); } } diff --git a/backend/src/main/java/com/twtw/backend/domain/group/entity/GroupMember.java b/backend/src/main/java/com/twtw/backend/domain/group/entity/GroupMember.java index fcdcc45a..86add204 100644 --- a/backend/src/main/java/com/twtw/backend/domain/group/entity/GroupMember.java +++ b/backend/src/main/java/com/twtw/backend/domain/group/entity/GroupMember.java @@ -126,7 +126,7 @@ public void checkExpire() { } private boolean isRequestNotExpired() { - return this.groupInviteCode == GroupInviteCode.REQUESTED - && this.baseTime.getCreatedAt().isAfter(LocalDateTime.now().minusMinutes(30L)); + return this.baseTime == null || (this.groupInviteCode == GroupInviteCode.REQUESTED + && this.baseTime.getCreatedAt().isAfter(LocalDateTime.now().minusMinutes(30L))); } } diff --git a/backend/src/main/java/com/twtw/backend/domain/plan/entity/PlanMember.java b/backend/src/main/java/com/twtw/backend/domain/plan/entity/PlanMember.java index 809f0437..04028aaf 100644 --- a/backend/src/main/java/com/twtw/backend/domain/plan/entity/PlanMember.java +++ b/backend/src/main/java/com/twtw/backend/domain/plan/entity/PlanMember.java @@ -100,6 +100,7 @@ public String getDeviceTokenValue() { } private boolean isRequestNotExpired() { - return this.baseTime.getCreatedAt().isAfter(LocalDateTime.now().minusMinutes(30L)); + return this.baseTime == null || + (this.planInviteCode == PlanInviteCode.REQUESTED && this.baseTime.getCreatedAt().isAfter(LocalDateTime.now().minusMinutes(30L))); } }