Add "archive" to messages API
Categories
(Thunderbird :: Add-Ons: Extensions API, enhancement)
Tracking
(Not tracked)
People
(Reporter: brummolix, Assigned: darktrojan)
References
Details
Attachments
(2 files, 1 obsolete file)
6.89 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
43.96 KB,
patch
|
mkmelin
:
review-
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0
Steps to reproduce:
It would be nice to have a "archive" function in the messages API
As I see in "https://hg.mozilla.org/comm-central/file/tip/mail/components/extensions/schemas/messages.json" there seem to be a copy and move function.
The archive function would be similar, expect that it would use the archive folder and archive settings.
Assignee | ||
Comment 1•6 years ago
|
||
I'd like to have this, but first the archiving code will need to be extracted from the UI code and put somewhere the extensions back end can reach it. Not impossible, but not easy either.
Assignee | ||
Comment 2•6 years ago
|
||
Part 1 - moves a bunch of functions into MailUtils and creates a new MessageArchiver.jsm.
Assignee | ||
Comment 3•6 years ago
|
||
Part 2 - webextension function
Assignee | ||
Comment 4•6 years ago
|
||
(That was less complicated than it looked.)
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/01f42b50676e
part 1 - Move message archiving code into a module; r=mkmelin
https://hg.mozilla.org/comm-central/rev/c9405e4f0251
part 2 - Add WebExtension function to archive messages; r=mkmelin
Assignee | ||
Updated•6 years ago
|
Comment 8•6 years ago
|
||
https://hg.mozilla.org/comm-central/rev/b2fa1e4525183c3f621d83299880e6a3b9895bee
Backed out 2 changesets (bug 1529785) for test failures. a=backout
Assignee | ||
Comment 9•6 years ago
|
||
Okay, failure 1 was because I renamed something after the Try run.
Failure 2 was because I dismissed it in the Try run as not possibly caused by this patch, but it was.
I eliminated findDeliveredToIdentityEmail
because it foolishly ties logic to the UI, and forgot to replace it.
Assignee | ||
Comment 10•6 years ago
|
||
Let's try that again.
Comment 11•6 years ago
|
||
Assignee | ||
Comment 12•6 years ago
|
||
It is defined by the outer function, further down. I put the inner function at the top because that's what you're supposed to do.
Comment 13•6 years ago
|
||
Surprised that works. Please pass in the hdr to the function, to remove the magic mix. r=mkmelin with that
Comment 14•6 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/1b5861b5c09a
part 1 - Move message archiving code into a module; r=mkmelin
https://hg.mozilla.org/comm-central/rev/ffedede7fa10
part 2 - Add WebExtension function to archive messages; r=mkmelin
Reporter | ||
Comment 15•6 years ago
|
||
I tried to use the new function in TB 680b1 on Windows.
But it says: browser.messages.archive is not a function
The output of the browser.messages object at the console gives:
"
continueList: function ()
copy: undefined
delete: undefined
get: function ()
getFull: function ()
list: function ()
listTags: function ()
move: undefined
update: function ()
<get continueList()>: function ()
<set continueList()>: function ()
<get copy()>: function ()
<set copy()>: function ()
<get delete()>: function ()
<set delete()>: function ()
<get get()>: function ()
<set get()>: function ()
<get getFull()>: function ()
<set getFull()>: function ()
<get listTags()>: function ()
<set listTags()>: function ()
<get move()>: function ()
<set move()>: function ()
<get update()>: function ()
<set update()>: function ()
<prototype>: Object { … }
"
Assignee | ||
Comment 16•6 years ago
|
||
It appears your extension does not have the messagesMove
permission.
Please don't reopen bugs that have been fixed for some time. Open a new one if you think something is wrong.
Description
•