messages.update API does not really change message tags in IMAP folders
Categories
(Thunderbird :: Add-Ons: Extensions API, defect)
Tracking
(thunderbird_esr68 fixed)
Tracking | Status | |
---|---|---|
thunderbird_esr68 | --- | fixed |
People
(Reporter: mevedech, Assigned: darktrojan)
Details
Attachments
(1 file)
6.40 KB,
patch
|
mkmelin
:
review+
mkmelin
:
approval-comm-esr68+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Steps to reproduce:
Thunderbird 68.3.0, Debian 9, Linux 4.9, x86_64
I have IMAP accounts and I am developing an extension (MailExtension, no legacy code) for Thunderbird. My extension should add a tag to messages in some cases.
In my extension code:
let ml = await browser.mailTabs.getSelectedMessages();
let mh = ml.messages[0]; // assume there is at least one message
let tags = mh.tags;
// ... checking if there is no our tag in 'tags' ...
tags.push('some valid tag'); //e.g. '$label3'
await browser.messages.update(mh.id, {'tags': tags});
Actual results:
The added tag has appeared in the Thunderbird interface: the message is colored properly and it can be filtered by that tag. But the message remains without my tag on the IMAP server side. So when I see that message next time (after I go to another folder or restart the program) it has not my tag. If I tag the message manually the tag is saved properly. It is reproduced with a public IMAP server and with my own IMAP server, so I think it is not a server bug.
The bug does not appear in local (not IMAP) folders.
Expected results:
The tag should be saved in IMAP server.
Assignee | ||
Comment 1•4 years ago
|
||
Can confirm. I think this is partly bug 1596371, but mainly naïve tag setting code in the API, which also destroys keywords that aren't tags. I'll fix that at the same time.
Assignee | ||
Comment 2•4 years ago
|
||
Comment 3•4 years ago
|
||
Comment on attachment 9118128 [details] [diff] [review] 1605915-keywords-tags-1.diff Review of attachment 9118128 [details] [diff] [review]: ----------------------------------------------------------------- LGTM, r=mkmelin
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/04f68cf65ac6
Prevent APIs interfering with non-tag keywords on messages; r=mkmelin
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
Assignee | ||
Comment 6•4 years ago
|
||
… plus two characters:
https://hg.mozilla.org/releases/comm-esr68/rev/d12adacd855d0a498fc37abe4c2e2e051ded5a60
Description
•