Sync global-autoresponder current state
This commit is contained in:
@@ -114,7 +114,7 @@ class DirectAdminVacationApi
|
||||
return [$m[1], $m[2]];
|
||||
}
|
||||
if (!preg_match('/^([0-9]{4}-[0-9]{2}-[0-9]{2})\|(morning|afternoon|evening)$/', $value, $m)) {
|
||||
throw new InvalidArgumentException('DirectAdmin API backend requires exact date-time values');
|
||||
throw new InvalidArgumentException('DirectAdmin vacation sync requires exact date-time values');
|
||||
}
|
||||
$time = ['morning' => '08:00', 'afternoon' => '13:00', 'evening' => $start ? '18:00' : '23:59'][$m[2]];
|
||||
return [$m[1], $time];
|
||||
@@ -147,9 +147,6 @@ class DirectAdminVacationApi
|
||||
/** @param array<string,mixed> $rule */
|
||||
private function replyOnceTime(array $rule): string
|
||||
{
|
||||
if (!empty($rule['reply_every_message'])) {
|
||||
return '1m';
|
||||
}
|
||||
return match ((int)($rule['repeat_minutes'] ?? 1440)) {
|
||||
1 => '1m',
|
||||
10 => '10m',
|
||||
|
||||
Reference in New Issue
Block a user