WebExtensions needs a "new mail arrived" event
Categories
(Thunderbird :: Add-Ons: Extensions API, enhancement)
Tracking
(Not tracked)
People
(Reporter: darktrojan, Assigned: darktrojan)
References
Details
Attachments
(1 file)
7.45 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
Comment 1•5 years ago
|
||
I agree on the matter. At the moment I have to use WebExtension Experiment API and to use
Cc["@mozilla.org/messenger/msgnotificationservice;1"].getService(Ci.nsIMsgFolderNotificationService)
in implementation.js
in order to subscribe to the event.
It would be nice if browser.messages
, for example, were extended with the events related to received / sent messages and an ability to access at least MessageHeader of the message in a callback.
Comment 2•5 years ago
|
||
P. S. Actually, after grepping comm-central, I started to use MailServices.mfn
and context.extension.messageManager.convert
to implement the event only and to do the rest in background.js
but nonetheless.
I would be keen to get this API too.
Thanks Alexander for the workaround. I only started to have a look to Thunderbird WebExtension today so using MailServices.mfn
and context.extension.messageManager.convert
for me are still not clear yet but I will figure out.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 4•5 years ago
|
||
I've wrapped this around nsIMsgFolderListener.msgsClassified
which seems to be the most reliable way to get the messages in question (and only those messages). I started out with the various biff notifications but that just wasn't good enough for this use.
Is my description in messages.json accurate? I based it on the comments in nsIMsgFolderListener.idl but I'm not sure if I've understood it correctly.
Comment 5•5 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/2679ad2daf98
WebExtensions API event for when new mail arrives. r=mkmelin
Assignee | ||
Updated•5 years ago
|
Description
•