mirror of
https://github.com/nodemailer/wildduck.git
synced 2024-11-10 17:47:07 +08:00
do not sort search results
This commit is contained in:
parent
e42a128ee6
commit
a6309be9ab
1 changed files with 6 additions and 16 deletions
22
imap.js
22
imap.js
|
@ -1170,20 +1170,6 @@ server.onSearch = function (path, options, session, callback) {
|
|||
$and: []
|
||||
};
|
||||
|
||||
let projection = {
|
||||
uid: true,
|
||||
//internaldate: true,
|
||||
//headerdate: true,
|
||||
//flags: true,
|
||||
modseq: true
|
||||
};
|
||||
|
||||
//if (options.terms.includes('body') || options.terms.includes('text') || options.terms.includes('header')) {
|
||||
// projection.mimeTree = true;
|
||||
//}
|
||||
|
||||
//if (!options.terms.includes('all')) {
|
||||
|
||||
let hasAll = false;
|
||||
let nothing = false;
|
||||
let walkQuery = (parent, ne, node) => {
|
||||
|
@ -1433,11 +1419,15 @@ server.onSearch = function (path, options, session, callback) {
|
|||
}
|
||||
|
||||
let cursor = db.database.collection('messages').find(query).
|
||||
project(projection).
|
||||
project({
|
||||
uid: true,
|
||||
modseq: true
|
||||
});
|
||||
/*.
|
||||
sort([
|
||||
['mailbox', 1],
|
||||
['uid', 1]
|
||||
]);
|
||||
]);*/
|
||||
|
||||
let highestModseq = 0;
|
||||
let uidList = [];
|
||||
|
|
Loading…
Reference in a new issue