support msgsDeleted! which apparently is used by the compose mechanism...
authorAndrew Sutherland <asutherland@asutherland.org>
Fri, 18 Jul 2008 15:38:20 -0700
changeset 854 8dfd8299e8a5f146d81040a844320e473e8a0fc2
parent 853 9421fff515cb1f5c1ed8d06c0ccd21e5ecf9c899
child 855 77c5642b3712e8dc5eb59dc97bc6f3c66ead56db
push idunknown
push userunknown
push dateunknown
support msgsDeleted! which apparently is used by the compose mechanism...
modules/indexer.js
--- a/modules/indexer.js
+++ b/modules/indexer.js
@@ -492,18 +492,26 @@ let GlodaIndexer = {
                   this._log.info("Move unable to locate message with header " +
                     "message-id " + item[1] + ". Folder is known to possess " +
                     this._indexingFolder.getTotalMessages(false) +" messages.");
                 }
                 // remember to eat extra tokens... when we get more than one...
               }
               // -- MESSAGE DELETE (batch steady state)
               else { // job.deltaType < 0
-                // item must be a message id
-                let message = GlodaDatastore.getMessageByID(item);
+                // item is either: a message id
+                //              or [folder ID, message key]
+                let message;
+                if (item instanceof Array) {
+                  this._indexerEnterFolder(item[0], false);
+                  message = this_indexingFolder.GetMessageHeader(item[1]);
+                }
+                else {
+                  message = GlodaDatastore.getMessageByID(item);
+                }
                 // delete the message!
                 if (message !== null)
                   this._deleteMessage(message);
               }
               
               // we do need to kill the job when we hit the items.length
               if (job.offset == job.items.length)
                 job = this._curIndexingJob = null;