Skip to content

Commit 2d5b1bd

Browse files
committed
feat(place/bookings): don't display far off bookings
1 parent 51a9bad commit 2d5b1bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/place/bookings.cr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ class Place::Bookings < PlaceOS::Driver
406406
booked = true
407407
end
408408
end
409-
self[:next_booking] = booking
409+
# don't display upcoming bookings if they are a long way off
410+
self[:next_booking] = start_time < 10.hours.from_now.to_unix ? booking : nil
410411
else
411412
self[:next_booking] = nil
412413
end

0 commit comments

Comments
 (0)