RealRaven2000 / FiltaQuilla

Adds many new mail filter actions to Thunderbird
http://quickfilters.quickfolders.org/filtaquilla.html
GNU General Public License v3.0
88 stars 17 forks source link

Can't use official apis #266

Open Zawardo1000 opened 4 months ago

Zawardo1000 commented 4 months ago

I'm making a js action script to do some stuff during a filter. But i don't understand how to use the webextension apis... i saw filtaquilla already have a messenger defined: let messenger = Cc["@mozilla.org/messenger;1"].createInstance(Ci.nsIMessenger);

but when i try to access the api (example: messenger.folders.*) the api is undefined. What am i missing?

RealRaven2000 commented 4 months ago

The script here runs in legacy mode (you do not have access to APIs) - I am not sure whether it is possible to expose APIs via scripting, but I can ask on the next Add-on developer meeting. So the messenger object here is not the same as the API namespace (messenger / browser)

Generally scripting by users directly is probably not supported / encouraged by APIs, but I need to find out more on what the policies are here...

Zawardo1000 commented 4 months ago

Do'h, that's unfortunate 😅 Is there a way to create an IMAP folder without apis? Thanks a lot.