Fixed a whole lot of brokenness in Inbox SMS/Email notifications
WebGUI::Inbox::Message::create now passes isInbox flag to WebGUI::Mail::Send::create so that per-user notification settings get used SMS Gateway setting field is now 'text' instead of 'email' so that user can enter a properly formed value (such as 'myemailgateway.com', which is not an email address). Added SMS notification template as distinct from email notification template because SMSs should not be HTML and in general you will want to make your SMS notification message a lot shorter than your html email notification message (160 char limits in many countries). As a result, SMSs are now sent as separate emails to gateway rather than being CCd on email notification. Added smsGatewaySubject setting because many SMS Gateways use email subject for authentication. For consistency, also added Email notification email subject. Fixed handling of different combinations of site-wide sendInboxNotificationsOnly with per-user receiveInboxEmailNotifications and receiveInboxSmsEmailNotifications. * sendInboxNotificationsOnly && receiveInboxEmailNotifications = email notification * sendInboxNotificationsOnly && !receiveInboxEmailNotifications = no email * !sendInboxNotificationsOnly = ignore receiveInboxEmailNotifications * In all cases, SMS is optional and only dependent on receiveInboxSmsEmailNotifications Updated tests and i18n
This commit is contained in:
parent
3cc02af6bb
commit
388a0b1267
12 changed files with 264 additions and 109 deletions
|
|
@ -774,6 +774,17 @@ our $I18N = {
|
|||
message => q|Should WebGUI just send notifications about Inbox messages, instead of the message itself?|,
|
||||
lastUpdated => 1235696295,
|
||||
},
|
||||
|
||||
'inbox notifications subject' => {
|
||||
message => q|Inbox Notification Email Subject|,
|
||||
context => q|Site setting. A notification is a short message that a message is in the Inbox.|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'inbox notifications subject help' => {
|
||||
message => q|The email subject to use for inbox notifications|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'inbox notification' => {
|
||||
message => q|You have a new message in your Inbox.|,
|
||||
|
|
@ -790,6 +801,22 @@ our $I18N = {
|
|||
message => q|Choose a template that will be used to display Inbox Notifications.|,
|
||||
lastUpdated => 1242274703,
|
||||
},
|
||||
|
||||
'inbox sms notification' => {
|
||||
message => q|You have a new message in your Inbox.|,
|
||||
lastUpdated => 1235708853,
|
||||
},
|
||||
|
||||
'inbox sms notification template' => {
|
||||
message => q|Inbox SMS Notification Template|,
|
||||
context => q|Site setting. A notification is a short SMS message that a message is in the Inbox.|,
|
||||
lastUpdated => 1242274705,
|
||||
},
|
||||
|
||||
'inbox sms notification template help' => {
|
||||
message => q|Choose a template that will be used to display Inbox SMS Notifications.|,
|
||||
lastUpdated => 1242274703,
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -4555,7 +4555,7 @@ Users may override this setting in their profile.
|
|||
},
|
||||
|
||||
'sms gateway' => {
|
||||
message => q|SMS gateway|,
|
||||
message => q|SMS Gateway|,
|
||||
context => q|email to SMS/text email address for this site.|,
|
||||
lastUpdated => 1235685248,
|
||||
},
|
||||
|
|
@ -4564,6 +4564,17 @@ Users may override this setting in their profile.
|
|||
message => q|The email address that this site would use to send an SMS message.|,
|
||||
lastUpdated => 1235695517,
|
||||
},
|
||||
|
||||
'sms gateway subject' => {
|
||||
message => q|SMS Gateway Subject|,
|
||||
context => q|Subject to use for the SMS Gateway for this site.|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'sms gateway subject help' => {
|
||||
message => q|The email subject to pass to the SMS Gateway (typically used for SMS Gateway authorization).|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'Select One' => {
|
||||
message => q|Select One|,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue