mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-20 22:05:57 +00:00
feat(calendar): Add option to disable email appointmoint notifications when using caldav
This commit is contained in:
@@ -806,6 +806,7 @@
|
||||
|
||||
ownerUser = [SOGoUser userWithLogin: owner];
|
||||
dd = [ownerUser domainDefaults];
|
||||
|
||||
if ([dd appointmentSendEMailNotifications] && [object isStillRelevant])
|
||||
{
|
||||
count = [attendees count];
|
||||
@@ -1033,6 +1034,8 @@
|
||||
to: (iCalPerson *) recipient
|
||||
{
|
||||
SOGoDomainDefaults *dd;
|
||||
SOGoUserSettings *settings;
|
||||
BOOL canSendNotification, doNotSendNotificationOnCalDav;
|
||||
|
||||
// We never send IMIP reply when the "initiator" is Outlook 2013/2016 over
|
||||
// the EAS protocol. That is because Outlook will always issue a SendMail command
|
||||
@@ -1042,8 +1045,15 @@
|
||||
if ([[context objectForKey: @"DeviceType"] isEqualToString: @"WindowsOutlook15"])
|
||||
return;
|
||||
|
||||
canSendNotification = NO;
|
||||
settings = [from userSettings];
|
||||
doNotSendNotificationOnCalDav = ([settings objectForKey: @"Calendar"]
|
||||
&& [[settings objectForKey: @"Calendar"] objectForKey: @"InvitationNotificationsOnCalDavDisabled"]
|
||||
&& 1 == [[[settings objectForKey: @"Calendar"] objectForKey: @"InvitationNotificationsOnCalDavDisabled"] intValue]);
|
||||
canSendNotification = !doNotSendNotificationOnCalDav || !(doNotSendNotificationOnCalDav && [[context request] isSoWebDAVRequest]);
|
||||
|
||||
dd = [from domainDefaults];
|
||||
if ([dd appointmentSendEMailNotifications] && [event isStillRelevant])
|
||||
if ([dd appointmentSendEMailNotifications] && [event isStillRelevant] && canSendNotification)
|
||||
{
|
||||
// We first send to the real recipient (organizer)
|
||||
[self _sendIMIPReplyForEvent: event
|
||||
|
||||
@@ -152,6 +152,7 @@
|
||||
"Contacts Names" = "Contacts Names";
|
||||
"Duplicate name" = "Duplicate name";
|
||||
"Calendar categories must have unique names." = "Calendar categories must have unique names.";
|
||||
"Disable e-mail notifications on CalDAV" = "Disable e-mail notifications on CalDAV";
|
||||
|
||||
/* Default Calendar */
|
||||
"Default calendar" = "Default calendar";
|
||||
|
||||
@@ -152,6 +152,7 @@
|
||||
"Contacts Names" = "Noms des contacts";
|
||||
"Duplicate name" = "Nom déjà utilisé";
|
||||
"Calendar categories must have unique names." = "Les catégories doivent être uniques.";
|
||||
"Disable e-mail notifications on CalDAV" = "Désactiver les notifications e-mail avec CalDAV";
|
||||
|
||||
/* Default Calendar */
|
||||
"Default calendar" = "Calendrier par défaut";
|
||||
|
||||
@@ -552,6 +552,12 @@
|
||||
id="calendarInvitationsTab-content">
|
||||
|
||||
<div layout="column" flex="100">
|
||||
<md-checkbox
|
||||
ng-model="app.preferences.settings.Calendar.InvitationNotificationsOnCalDavDisabled"
|
||||
ng-true-value="1"
|
||||
ng-false-value="0">
|
||||
<var:string label:value="Disable e-mail notifications on CalDAV"/>
|
||||
</md-checkbox>
|
||||
<md-checkbox
|
||||
ng-model="app.preferences.settings.Calendar.PreventInvitations"
|
||||
ng-true-value="1"
|
||||
|
||||
Reference in New Issue
Block a user