Merge pull request #4 from whiteout-io/dev/fallbacksubject

provide fallback (no subject)
This commit is contained in:
Tankred Hase 2014-01-16 03:56:24 -08:00
commit 3d9ddcc291
3 changed files with 3 additions and 2 deletions

View File

@ -47,6 +47,7 @@ define(function(require) {
*/
app.string = {
subjectPrefix: '[whiteout] ',
fallbackSubject: '(no subject)',
invitationSubject: 'Invitation to a private conversation',
invitationMessage: 'I would like to invite you to a private conversation. To read my encrypted messages, simply install Whiteout Mail for Chrome. The app is really easy to use and automatically encrypts sent emails, so that only the two of us can read them.\n\nOpen Whiteout Mail: https://chrome.google.com/webstore/detail/jjgghafhamholjigjoghcfcekhkonijg',
message: 'this is a private conversation. To read my encrypted message below, simply install Whiteout Mail for Chrome. The app is really easy to use and automatically encrypts sent emails, so that only the two of us can read them.\n\nOpen Whiteout Mail: https://chrome.google.com/webstore/detail/jjgghafhamholjigjoghcfcekhkonijg',

View File

@ -200,7 +200,7 @@ define(function(require) {
to: [],
cc: [],
bcc: [],
subject: $scope.subject, // Subject line
subject: $scope.subject.trim() ? $scope.subject.trim() : str.fallbackSubject, // Subject line, or the fallback subject, if nothing valid was entered
body: $scope.body.trim() // use parsed plaintext body
};
email.from = [{

View File

@ -487,7 +487,7 @@ define(function(require) {
}
// imap filtering is insufficient, since google ignores non-alphabetical characters
if (message.subject.indexOf(str.subjectPrefix.trim()) === -1) {
if (message.subject.indexOf(str.subjectPrefix) === -1) {
syncNextItem();
return;
}