mirror of
https://github.com/moparisthebest/mail
synced 2024-11-22 08:52:15 -05:00
[WO-660] Add \Flagged to message flags
This commit is contained in:
parent
7d223dc851
commit
d67f2a5d53
@ -37,7 +37,7 @@
|
||||
"axe-logger": "~0.0.2",
|
||||
"crypto-lib": "~0.2.1",
|
||||
"dompurify": "~0.4.2",
|
||||
"imap-client": "~0.5.0",
|
||||
"imap-client": "https://github.com/whiteout-io/imap-client/tarball/dev/WO-660",
|
||||
"jquery": "~2.1.1",
|
||||
"mailreader": "~0.4.0",
|
||||
"ng-infinite-scroll": "~1.1.2",
|
||||
|
@ -585,7 +585,8 @@ EmailDAO.prototype.setFlags = function(options, callback) {
|
||||
folder: folder,
|
||||
uid: options.message.uid,
|
||||
unread: options.message.unread,
|
||||
answered: options.message.answered
|
||||
answered: options.message.answered,
|
||||
flagged: options.message.flagged
|
||||
}, function(err) {
|
||||
if (err) {
|
||||
done(err);
|
||||
@ -612,6 +613,7 @@ EmailDAO.prototype.setFlags = function(options, callback) {
|
||||
// set the flags
|
||||
var storedMessage = storedMessages[0];
|
||||
storedMessage.unread = options.message.unread;
|
||||
storedMessage.flagged = options.message.flagged;
|
||||
storedMessage.answered = options.message.answered;
|
||||
storedMessage.modseq = options.message.modseq || storedMessage.modseq;
|
||||
|
||||
|
@ -321,11 +321,13 @@ describe('Email DAO integration tests', function() {
|
||||
it('should receive new messages', function(done) {
|
||||
emailDao.onIncomingMessage = function(messages) {
|
||||
expect(messages.length).to.equal(1);
|
||||
expect(messages[0].answered).to.be.false;
|
||||
expect(messages[0].answered).to.be.true;
|
||||
expect(messages[0].flagged).to.be.true;
|
||||
expect(messages[0].unread).to.be.false;
|
||||
done();
|
||||
};
|
||||
|
||||
imapServer.appendMessage('INBOX', ['$My$Flag'], false, 'Message-id: <n1>\r\nSubject: new message\r\n\r\nhello world!');
|
||||
imapServer.appendMessage('INBOX', ['\\Flagged', '\\Seen', '\\Answered'], false, 'Message-id: <n1>\r\nSubject: new message\r\n\r\nhello world!');
|
||||
});
|
||||
|
||||
it('should delete a message', function(done) {
|
||||
@ -391,6 +393,7 @@ describe('Email DAO integration tests', function() {
|
||||
var message = inbox.messages[1];
|
||||
message.unread = false;
|
||||
message.answered = true;
|
||||
message.flagged = true;
|
||||
|
||||
emailDao.setFlags({
|
||||
folder: inbox,
|
||||
|
@ -728,7 +728,8 @@ describe('Email DAO unit tests', function() {
|
||||
folder: inboxFolder,
|
||||
uid: message.uid,
|
||||
unread: message.unread,
|
||||
answered: message.answered
|
||||
answered: message.answered,
|
||||
flagged: message.flagged
|
||||
}).yieldsAsync();
|
||||
|
||||
localListStub.withArgs({
|
||||
|
Loading…
Reference in New Issue
Block a user