Finish change over to always using preceding backslash for flags

fork
mscdex 11 years ago
parent 0e1b019b9b
commit 8ea6b78532

@ -301,11 +301,11 @@ Therefore, an easy way to check for a multipart message is to check if the struc
Lastly, here are the system flags defined by RFC3501 that may be added/removed:
* Seen - Message has been read
* Answered - Message has been answered
* Flagged - Message is "flagged" for urgent/special attention
* Deleted - Message is "deleted" for removal
* Draft - Message has not completed composition (marked as a draft).
* \Seen - Message has been read
* \Answered - Message has been answered
* \Flagged - Message is "flagged" for urgent/special attention
* \Deleted - Message is marked for removal
* \Draft - Message has not completed composition (marked as a draft).
It should be noted however that the IMAP server can limit which flags can be permanently modified for any given message. If in doubt, check the mailbox's **permFlags** first.
Additional custom flags may be provided by the server. If available, these will also be listed in the mailbox's **permFlags**.
@ -422,47 +422,47 @@ Connection Instance Methods
parent: null
},
'[Gmail]':
{ attribs: [ 'NOSELECT' ],
{ attribs: [ '\\NOSELECT' ],
delimiter: '/',
children:
{ 'All Mail':
{ attribs: [ 'All' ],
{ attribs: [ '\\All' ],
delimiter: '/',
children: null,
parent: [Circular]
},
Drafts:
{ attribs: [ 'Drafts' ],
{ attribs: [ '\\Drafts' ],
delimiter: '/',
children: null,
parent: [Circular]
},
Important:
{ attribs: [ 'Important' ],
{ attribs: [ '\\Important' ],
delimiter: '/',
children: null,
parent: [Circular]
},
'Sent Mail':
{ attribs: [ 'Sent' ],
{ attribs: [ '\\Sent' ],
delimiter: '/',
children: null,
parent: [Circular]
},
Spam:
{ attribs: [ 'Junk' ],
{ attribs: [ '\\Junk' ],
delimiter: '/',
children: null,
parent: [Circular]
},
Starred:
{ attribs: [ 'Flagged' ],
{ attribs: [ '\\Flagged' ],
delimiter: '/',
children: null,
parent: [Circular]
},
Trash:
{ attribs: [ 'Trash' ],
{ attribs: [ '\\Trash' ],
delimiter: '/',
children: null,
parent: [Circular]

@ -528,7 +528,7 @@ Connection.prototype._move = function(which, uids, boxTo, cb) {
boxTo = escape(utf7.encode(''+boxTo));
this._enqueue(which + 'MOVE ' + uids + ' "' + boxTo + '"', cb);
} else if (this._box.permFlags.indexOf('deleted') === -1) {
} else if (this._box.permFlags.indexOf('\\Deleted') === -1) {
throw new Error('Cannot move message: '
+ 'server does not allow deletion of messages');
} else {
@ -553,7 +553,7 @@ Connection.prototype._move = function(which, uids, boxTo, cb) {
});
} else if (task === 1) {
if (deletedUIDs.length) {
self.delFlags(deletedUIDs, 'Deleted', function(e) {
self.delFlags(deletedUIDs, '\\Deleted', function(e) {
++task;
ccb(e, info);
});
@ -567,9 +567,9 @@ Connection.prototype._move = function(which, uids, boxTo, cb) {
ccb(e, info);
};
if (which)
self.addFlags(uids, 'Deleted', cbMarkDel);
self.addFlags(uids, '\\Deleted', cbMarkDel);
else
self.seq.addFlags(uids, 'Deleted', cbMarkDel);
self.seq.addFlags(uids, '\\Deleted', cbMarkDel);
} else if (task === 3) {
if (which && self.serverSupports('UIDPLUS'))
self.expunge(uids, cb);
@ -581,7 +581,7 @@ Connection.prototype._move = function(which, uids, boxTo, cb) {
}
} else if (task === 4) {
if (deletedUIDs.length) {
self.addFlags(deletedUIDs, 'Deleted', function(e) {
self.addFlags(deletedUIDs, '\\Deleted', function(e) {
cb(e, info);
});
} else

Loading…
Cancel
Save