I’m developing (my first ever) Thunderbird Add-on with WebExtension and encountered problem with trying to get total of unread emails.
To my knowledge, there is no direct function for this so best I can think of is to use messages.query -with unread: true. Problems is that I get following error when trying to use query: “Error: An unexpected error occurred”.
Permission messagesRead -is defined in manifest and I have verified that I can read messages etc so it’s not permission issue.
I’ve tried to search other better means of getting info if there is any unread messages in any folder, but I didn’t find anything suitable withing WebExtension. Perhaps with WebExtension Experiments?, but I haven’t found any good docs for that.
Any feedback / ideas / etc are more than welcome!