diff --git a/src/main/kotlin/com/android/trisolarisserver/controller/BookingFlow.kt b/src/main/kotlin/com/android/trisolarisserver/controller/BookingFlow.kt index 6ff9b9e..5d5b765 100644 --- a/src/main/kotlin/com/android/trisolarisserver/controller/BookingFlow.kt +++ b/src/main/kotlin/com/android/trisolarisserver/controller/BookingFlow.kt @@ -80,7 +80,8 @@ class BookingFlow( } val now = nowForProperty(property.timezone) - val shouldCheckIn = !expectedCheckInAt.isAfter(now.plusMinutes(10)) + val shouldCheckIn = expectedCheckInAt.isBefore(now) && + !expectedCheckInAt.isBefore(now.minusMinutes(10)) val phone = request.guestPhoneE164?.trim()?.takeIf { it.isNotBlank() } val guest = resolveGuestForBooking(propertyId, property, actor, now, phone) val hasGuestCounts = request.maleCount != null || request.femaleCount != null || request.childCount != null