mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-13 07:47:12 +00:00
(fix) improve default vacation preferences handling
This commit is contained in:
1 parent
903c4280f4
commit
9926653faa
2 files changed
+14
-3
No files matched your search
@@ -33,11 +33,21 @@
|
||||
data.Vacation.endDateEnabled = 0;
|
||||
data.Vacation.endDate = new Date();
|
||||
}
|
||||
|
||||
if (data.Vacation.autoReplyEmailAddresses)
|
||||
if (data.Vacation.autoReplyEmailAddresses && data.Vacation.autoReplyEmailAddresses.length)
|
||||
data.Vacation.autoReplyEmailAddresses = data.Vacation.autoReplyEmailAddresses.join(",");
|
||||
} else {
|
||||
else
|
||||
delete data.Vacation.autoReplyEmailAddresses;
|
||||
} else
|
||||
data.Vacation = {};
|
||||
|
||||
if (!angular.isDefined(data.Vacation.autoReplyEmailAddresses) &&
|
||||
angular.isDefined(window.defaultEmailAddresses))
|
||||
data.Vacation.autoReplyEmailAddresses = window.defaultEmailAddresses;
|
||||
|
||||
if (!angular.isDefined(data.Vacation.daysBetweenResponse))
|
||||
data.Vacation.daysBetweenResponse = 7;
|
||||
|
||||
if (!angular.isDefined(data.Vacation.endDate)) {
|
||||
data.Vacation.endDateEnabled = 0;
|
||||
data.Vacation.endDate = new Date();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user