Feat: Out of office autoresponder (#2992)
This change allows the user to enable autoresponder during the out-of-office time. Fixes: #2035
This commit is contained in:
@@ -43,10 +43,10 @@ class WorkingHour < ApplicationRecord
|
||||
def open_at?(time)
|
||||
return false if closed_all_day?
|
||||
|
||||
time.hour >= open_hour &&
|
||||
time.min >= open_minutes &&
|
||||
time.hour <= close_hour &&
|
||||
time.min <= close_minutes
|
||||
open_time = Time.zone.now.in_time_zone(inbox.timezone).change({ hour: open_hour, min: open_minutes })
|
||||
close_time = Time.zone.now.in_time_zone(inbox.timezone).change({ hour: close_hour, min: close_minutes })
|
||||
|
||||
time.between?(open_time, close_time)
|
||||
end
|
||||
|
||||
def open_now?
|
||||
|
||||
Reference in New Issue
Block a user