Avoid auto check-in at exact time; only past 10 min window
Some checks failed
build-and-deploy / build-deploy (push) Has been cancelled

This commit is contained in:
androidlover5842
2026-01-29 11:54:30 +05:30
parent 33eebf06f6
commit 531c5c216d

View File

@@ -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