mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-19 02:15:36 +00:00
feat(notification): add custom message
This commit is contained in:
@@ -1220,6 +1220,7 @@ static NSString *sieveScriptName = @"sogo";
|
||||
{
|
||||
// BOOL alwaysSend;
|
||||
NSString *notify;
|
||||
NSString *message;
|
||||
id addresses;
|
||||
int i;
|
||||
|
||||
@@ -1232,12 +1233,14 @@ static NSString *sieveScriptName = @"sogo";
|
||||
if ([addresses isKindOfClass: [NSString class]])
|
||||
addresses = [addresses componentsSeparatedByString: @","];
|
||||
|
||||
message = [values objectForKey: @"notificationMessage"];
|
||||
|
||||
for (i = 0; i < [addresses count]; i++)
|
||||
{
|
||||
v = [addresses objectAtIndex: i];
|
||||
if (v && [v length] > 0)
|
||||
{
|
||||
notify = [NSString stringWithFormat: @"notify \"mailto:%@\";\r\n", v];
|
||||
notify = [NSString stringWithFormat: @"notify :message \"%@\"\r\n \"mailto:%@\";\r\n", message, v];
|
||||
|
||||
// if (alwaysSend)
|
||||
// [script insertString: notify atIndex: 0];
|
||||
|
||||
@@ -82,6 +82,8 @@
|
||||
|
||||
/* notification */
|
||||
"Notify incoming messsages" = "Notify incoming messsages";
|
||||
"Notification Message Sent" = "Notification message sent";
|
||||
"Notification Message" = "Notification of new message on %{0}";
|
||||
|
||||
/* d & t */
|
||||
"Time Zone" = "Time Zone";
|
||||
|
||||
@@ -82,6 +82,8 @@
|
||||
|
||||
/* notify messages */
|
||||
"Notify incoming messsages" = "Notifier les messages entrants";
|
||||
"Notification Message Sent" = "Message de notification envoyé";
|
||||
"Notification Message" = "Nouveau message reçu sur %{0}";
|
||||
|
||||
/* d & t */
|
||||
"Time Zone" = "Fuseau horaire";
|
||||
|
||||
@@ -1437,11 +1437,20 @@
|
||||
</md-autocomplete>
|
||||
</md-chips>
|
||||
</md-input-container>
|
||||
|
||||
<md-input-container class="md-block md-flex md-input-has-placeholder">
|
||||
<label><var:string label:value="Notification Message Sent"/></label>
|
||||
<textarea name="notificationMessage"
|
||||
id="notificationMessage"
|
||||
ng-model="app.preferences.defaults.Notification.notificationMessage"
|
||||
ng-required="app.preferences.defaults.Notification.enabled == 1">
|
||||
</textarea>
|
||||
</md-input-container>
|
||||
</div>
|
||||
</div>
|
||||
</md-tab>
|
||||
</var:if>
|
||||
<!-- END OF MAIL > FORWARD -->
|
||||
<!-- END OF MAIL > NOTIFICATIONS -->
|
||||
|
||||
</md-tabs>
|
||||
</var:if>
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
this.autocomplete = {forward: [], notification: []};
|
||||
this.mailLabelKeyRE = new RegExp(/^(?!^_\$)[^(){} %*\"\\\\]*?$/);
|
||||
this.emailSeparatorKeys = Preferences.defaults.emailSeparatorKeys;
|
||||
if (!Preferences.defaults.Notification.notificationMessage)
|
||||
this.preferences.defaults.Notification.notificationMessage = l('Notification Message', $window.defaultEmailAddresses);
|
||||
if (Preferences.defaults.SOGoMailAutoMarkAsReadMode == 'delay')
|
||||
this.mailAutoMarkAsReadDelay = Math.max(1, this.preferences.defaults.SOGoMailAutoMarkAsReadDelay);
|
||||
else
|
||||
@@ -724,7 +726,7 @@
|
||||
});
|
||||
}
|
||||
else {
|
||||
recipient = contact.$shortFormat();
|
||||
recipient = contact.$$email;
|
||||
}
|
||||
|
||||
if (recipient)
|
||||
|
||||
Reference in New Issue
Block a user