FiltaQuilla icon indicating copy to clipboard operation
FiltaQuilla copied to clipboard

Archive with Mozilla 102

Open isamuse2 opened this issue 2 years ago • 10 comments

I'm using Quintilla 3.5 with mozilla 102.3.2 The action "Archive" does not function. The message to be treated is correctly detected but the action fails. The error message is "custom action failed to apply"

isamuse2 avatar Oct 12 '22 10:10 isamuse2

+1

pro-fy avatar Oct 13 '22 19:10 pro-fy

Same for me with Thunderbird 102.4.1 and FiltaQuilla 3.6.1. First the log says 'custom action failed to apply' and immediately after (translated from german) 'filterActionFailed with error code 0x80570021'. Archiving is the only action in the filter i'm using.

david-53111 avatar Nov 01 '22 12:11 david-53111

I am having the same issue. The error console reports an error on line 1244 in filtaquilla.js.

image

However in the source filtaquilla.js the corresonpding line is 1258 referring to BatchMessageMover().

image

Maybe there was an API change?

kunago avatar Mar 01 '23 17:03 kunago

However the in the source file filtaquilla.js the corresonpding line is 1258 referring to BatchMessageMover().

There isn't much coming up on that even in the old version (Tb 91):

https://searchfox.org/comm-esr91/search?q=BatchMessageMover&path=&case=false&regexp=false

it seems to be only defined in "suite" - the SeaMonkey code base. I think this just very very old code (I didn't write this, only inherited the Add-on from Kent James.

RealRaven2000 avatar Mar 01 '23 21:03 RealRaven2000

PS: by the way these legacy Add-ons (and "experimental" ones) do not use APIs. They just hack the THunderbird frontend code and try to work with what (undocumented) objects are there.

I think the more correct way to do this would be:

https://searchfox.org/comm-esr102/source/mail/base/content/mailWindowOverlay.js#2284

  let archiver = new MessageArchiver();
  archiver.folderDisplay = gFolderDisplay;
  archiver.msgWindow = msgWindow;
  archiver.archiveMessages(gFolderDisplay.selectedMessages);

I jhust need to eliminate the gFolderDisplay and pass in an array of message headers instead. This would be the way to do it in THundebird 102 - I need to research whether this is backwards compatible with Tb91 or different code needs to be written there.

RealRaven2000 avatar Mar 01 '23 21:03 RealRaven2000

filtaquilla-3.6.2pre21.zip

test version with changed archiving code.

RealRaven2000 avatar Mar 01 '23 21:03 RealRaven2000

I tested on a small sample and it did work perfect. I will do more testing tomorrow and let you know.

kunago avatar Mar 01 '23 23:03 kunago

The "Archive" command seems to work perfect when run manually on a folder. When it is a regular filter being run on any new message received, the message stays in the folder. I don't see anything regarding this in the developer console though.

kunago avatar Mar 06 '23 13:03 kunago

The "Archive" command seems to work perfect when run manually on a folder. When it is a regular filter being run on any new message received, the message stays in the folder. I don't see anything regarding this in the developer console though.

Could you try to change it to "run after junk control". Also what's your search terms? (it would seem unusual to archive a message that was just freshly received.)

RealRaven2000 avatar Mar 06 '23 16:03 RealRaven2000

I will try with the "after junk" control.

Regarding the archivation upon reception, it's actually nice what one can do your plugin and filters in general;such as:

  1. don't notify me
  2. download an attachment to a folder (like bank statements)
  3. tag the email
  4. mark the email as read
  5. archive it

So the archivation for sure makes sense in such scenarios. Or the same goes for invoices for instance that I just save to a folder automatically and archive the email again.

kunago avatar Mar 06 '23 16:03 kunago