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: Lastly, here are the system flags defined by RFC3501 that may be added/removed:
* Seen - Message has been read * \Seen - Message has been read
* Answered - Message has been answered * \Answered - Message has been answered
* Flagged - Message is "flagged" for urgent/special attention * \Flagged - Message is "flagged" for urgent/special attention
* Deleted - Message is "deleted" for removal * \Deleted - Message is marked for removal
* Draft - Message has not completed composition (marked as a draft). * \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. 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**. 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 parent: null
}, },
'[Gmail]': '[Gmail]':
{ attribs: [ 'NOSELECT' ], { attribs: [ '\\NOSELECT' ],
delimiter: '/', delimiter: '/',
children: children:
{ 'All Mail': { 'All Mail':
{ attribs: [ 'All' ], { attribs: [ '\\All' ],
delimiter: '/', delimiter: '/',
children: null, children: null,
parent: [Circular] parent: [Circular]
}, },
Drafts: Drafts:
{ attribs: [ 'Drafts' ], { attribs: [ '\\Drafts' ],
delimiter: '/', delimiter: '/',
children: null, children: null,
parent: [Circular] parent: [Circular]
}, },
Important: Important:
{ attribs: [ 'Important' ], { attribs: [ '\\Important' ],
delimiter: '/', delimiter: '/',
children: null, children: null,
parent: [Circular] parent: [Circular]
}, },
'Sent Mail': 'Sent Mail':
{ attribs: [ 'Sent' ], { attribs: [ '\\Sent' ],
delimiter: '/', delimiter: '/',
children: null, children: null,
parent: [Circular] parent: [Circular]
}, },
Spam: Spam:
{ attribs: [ 'Junk' ], { attribs: [ '\\Junk' ],
delimiter: '/', delimiter: '/',
children: null, children: null,
parent: [Circular] parent: [Circular]
}, },
Starred: Starred:
{ attribs: [ 'Flagged' ], { attribs: [ '\\Flagged' ],
delimiter: '/', delimiter: '/',
children: null, children: null,
parent: [Circular] parent: [Circular]
}, },
Trash: Trash:
{ attribs: [ 'Trash' ], { attribs: [ '\\Trash' ],
delimiter: '/', delimiter: '/',
children: null, children: null,
parent: [Circular] parent: [Circular]

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

Loading…
Cancel
Save