TF-4069 Automatically reply should be deactivated vacation after end date

This commit is contained in:
dab246
2025-09-29 14:57:50 +07:00
committed by Dat H. Pham
parent 500a7e6a79
commit d6606aeb48
9 changed files with 117 additions and 75 deletions
@@ -2015,12 +2015,16 @@ class MailboxDashBoardController extends ReloadableController
downloadController.deleteDownloadTask(taskId);
}
void disableVacationResponder() {
void disableVacationResponder(VacationResponse vacationResponse) {
if (accountId.value != null && _updateVacationInteractor != null) {
final vacationDisabled = vacationResponse.value != null
? vacationResponse.value!.copyWith(isEnabled: false)
: VacationResponse(isEnabled: false);
consumeState(_updateVacationInteractor!.execute(accountId.value!, vacationDisabled));
consumeState(_updateVacationInteractor!.execute(
accountId.value!,
vacationResponse.clearAllExceptHtmlBody(),
));
} else {
consumeState(
Stream.value(Left(UpdateVacationFailure(ParametersIsNullException()))),
);
}
}