mirror of
https://github.com/moparisthebest/mail
synced 2024-11-22 17:02:17 -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",
|
"axe-logger": "~0.0.2",
|
||||||
"crypto-lib": "~0.2.1",
|
"crypto-lib": "~0.2.1",
|
||||||
"dompurify": "~0.4.2",
|
"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",
|
"jquery": "~2.1.1",
|
||||||
"mailreader": "~0.4.0",
|
"mailreader": "~0.4.0",
|
||||||
"ng-infinite-scroll": "~1.1.2",
|
"ng-infinite-scroll": "~1.1.2",
|
||||||
|
@ -585,7 +585,8 @@ EmailDAO.prototype.setFlags = function(options, callback) {
|
|||||||
folder: folder,
|
folder: folder,
|
||||||
uid: options.message.uid,
|
uid: options.message.uid,
|
||||||
unread: options.message.unread,
|
unread: options.message.unread,
|
||||||
answered: options.message.answered
|
answered: options.message.answered,
|
||||||
|
flagged: options.message.flagged
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
done(err);
|
done(err);
|
||||||
@ -612,6 +613,7 @@ EmailDAO.prototype.setFlags = function(options, callback) {
|
|||||||
// set the flags
|
// set the flags
|
||||||
var storedMessage = storedMessages[0];
|
var storedMessage = storedMessages[0];
|
||||||
storedMessage.unread = options.message.unread;
|
storedMessage.unread = options.message.unread;
|
||||||
|
storedMessage.flagged = options.message.flagged;
|
||||||
storedMessage.answered = options.message.answered;
|
storedMessage.answered = options.message.answered;
|
||||||
storedMessage.modseq = options.message.modseq || storedMessage.modseq;
|
storedMessage.modseq = options.message.modseq || storedMessage.modseq;
|
||||||
|
|
||||||
|
@ -321,11 +321,13 @@ describe('Email DAO integration tests', function() {
|
|||||||
it('should receive new messages', function(done) {
|
it('should receive new messages', function(done) {
|
||||||
emailDao.onIncomingMessage = function(messages) {
|
emailDao.onIncomingMessage = function(messages) {
|
||||||
expect(messages.length).to.equal(1);
|
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();
|
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) {
|
it('should delete a message', function(done) {
|
||||||
@ -391,6 +393,7 @@ describe('Email DAO integration tests', function() {
|
|||||||
var message = inbox.messages[1];
|
var message = inbox.messages[1];
|
||||||
message.unread = false;
|
message.unread = false;
|
||||||
message.answered = true;
|
message.answered = true;
|
||||||
|
message.flagged = true;
|
||||||
|
|
||||||
emailDao.setFlags({
|
emailDao.setFlags({
|
||||||
folder: inbox,
|
folder: inbox,
|
||||||
|
@ -728,7 +728,8 @@ describe('Email DAO unit tests', function() {
|
|||||||
folder: inboxFolder,
|
folder: inboxFolder,
|
||||||
uid: message.uid,
|
uid: message.uid,
|
||||||
unread: message.unread,
|
unread: message.unread,
|
||||||
answered: message.answered
|
answered: message.answered,
|
||||||
|
flagged: message.flagged
|
||||||
}).yieldsAsync();
|
}).yieldsAsync();
|
||||||
|
|
||||||
localListStub.withArgs({
|
localListStub.withArgs({
|
||||||
|
Loading…
Reference in New Issue
Block a user