mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-02 23:34:21 +00:00
feat(notificaiton) move custom message to body instead of subject
This commit is contained in:
@@ -1220,7 +1220,7 @@ static NSString *sieveScriptName = @"sogo";
|
||||
{
|
||||
// BOOL alwaysSend;
|
||||
NSString *notify;
|
||||
NSString *message;
|
||||
NSString *message, *notificationTranslated;
|
||||
id addresses;
|
||||
int i;
|
||||
|
||||
@@ -1228,19 +1228,23 @@ static NSString *sieveScriptName = @"sogo";
|
||||
b = YES;
|
||||
|
||||
[req addObjectUniquely: @"enotify"];
|
||||
[req addObjectUniquely: @"variables"];
|
||||
|
||||
addresses = [values objectForKey: @"notificationAddress"];
|
||||
if ([addresses isKindOfClass: [NSString class]])
|
||||
addresses = [addresses componentsSeparatedByString: @","];
|
||||
|
||||
message = [values objectForKey: @"notificationMessage"];
|
||||
notificationTranslated = [values objectForKey: @"notificationTranslated"];
|
||||
|
||||
for (i = 0; i < [addresses count]; i++)
|
||||
{
|
||||
v = [addresses objectAtIndex: i];
|
||||
if (v && [v length] > 0)
|
||||
{
|
||||
notify = [NSString stringWithFormat: @"notify :message \"%@\"\r\n \"mailto:%@\";\r\n", message, v];
|
||||
notify = @"if header :matches \"subject\" \"*\" {\r\n set \"subject\" \"${1}\";\r\n}\r\n";
|
||||
notify = [notify stringByAppendingFormat: @"set :encodeurl \"body_param\" \"%@\";\r\n", message];
|
||||
notify = [notify stringByAppendingFormat: @"notify :message \"%@: ${subject}\" \"mailto:%@\";\r\n", notificationTranslated, v];
|
||||
|
||||
// if (alwaysSend)
|
||||
// [script insertString: notify atIndex: 0];
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
"Vacation" = "Vacation";
|
||||
"Forward" = "Forward";
|
||||
"Password" = "Password";
|
||||
"Notification" = "Notification";
|
||||
"Categories" = "Categories";
|
||||
"Appointments invitations" = "Appointments invitations";
|
||||
"Name" = "Name";
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
"IMAP Accounts" = "Comptes IMAP";
|
||||
"Vacation" = "Absence prolongée";
|
||||
"Forward" = "Transfert";
|
||||
"Notification" = "Notification";
|
||||
"Password" = "Mot de passe";
|
||||
"Categories" = "Catégories";
|
||||
"Appointments invitations" = "Invitations";
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
this.emailSeparatorKeys = Preferences.defaults.emailSeparatorKeys;
|
||||
if (!Preferences.defaults.Notification.notificationMessage)
|
||||
this.preferences.defaults.Notification.notificationMessage = l('Notification Message', $window.defaultEmailAddresses);
|
||||
this.preferences.defaults.Notification.notificationTranslated = l('Notification');
|
||||
if (Preferences.defaults.SOGoMailAutoMarkAsReadMode == 'delay')
|
||||
this.mailAutoMarkAsReadDelay = Math.max(1, this.preferences.defaults.SOGoMailAutoMarkAsReadDelay);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user