allow browser.messages.query to find messages with specified tags
Categories
(Thunderbird :: Add-Ons: Extensions API, enhancement)
Tracking
(Not tracked)
People
(Reporter: mkmelin, Assigned: darktrojan)
Details
Attachments
(1 file, 2 obsolete files)
10.38 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
https://thunderbird-webextensions.readthedocs.io/en/68/messages.html#query-queryinfo
queryInfo doesn't allow a list tags as one of the options. We should allow querying by tags.
Assignee | ||
Comment 1•4 years ago
|
||
I was going to implement this with an array of tags that must all match, but I think it fits better to only allow querying one tag. Any further filtering can be done by the extension.
Assignee | ||
Comment 2•4 years ago
|
||
Reporter | ||
Comment 4•4 years ago
|
||
Comment on attachment 9118131 [details] [diff] [review] 1600547-query-by-tag-1.diff Review of attachment 9118131 [details] [diff] [review]: ----------------------------------------------------------------- Tags are more complex, and I think we shouldn't limit it to one tag only. The api should support many and also allow the combination have, have not.
Reporter | ||
Comment 5•4 years ago
|
||
Possibly for NOT, we should just interpret !foo as not foo.
in order to keep compatibility with current use, I opt to implement it as is done in gloda.query. There, for example, I can query for an array of tags as returned by the tag service.
use scenario: for mail servers not storing tags, have a query that returns all tagged emails together with their tags, headermessageIDs, folder info (e.g. folder and parent), so a list can be backed up in the file system and can be restored to the mailbox.
special important use scenario: on an imap server, repair folder actually kills tags. It should better be renamed redownload folder. Although the tags were there before repair, they are gone after repair (unless the imap server stores them, but that is not required by imap rfc)..
So unless I can backup/restore the tags, tags are gone after folder repair on certain imap servers.
Assignee | ||
Comment 7•4 years ago
|
||
Allows for querying any number of tags matching any or all of the tags. Does not check for the non-existence of tags, because GloDa doesn't support that.
Reporter | ||
Updated•4 years ago
|
why filter the collection and not let Gloda do the searching?
If I search only for tagged queries, the proposal would search in Gloda for an empty condition and throw an error. I think similiar was reported some time ago for read (?) status? I think there, Gloda didn't work on that status, as the bug (Geoff?) later reported.
But query.tags() works at least in TB 68.
At least for all tags, this works in 68:
let tagArray = MailServices.tags.getAllTags({});
query.tags(...tagArray);
Klaus
Assignee | ||
Comment 9•4 years ago
|
||
Perhaps it would help if I uploaded the current patch instead of the first one again. I'm surprised you didn't notice, Magnus.
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Comment 10•4 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/5c29bf6eb78b
Allow browser.messages.query to find messages with specified tag. r=mkmelin DONTBUILD
Assignee | ||
Updated•4 years ago
|
Comment 11•4 years ago
|
||
Pushed by geoff@darktrojan.net: https://hg.mozilla.org/comm-central/rev/c4ca8ba04d38 and bug 1611623 - fix linting errors. rs=linting DONTBUILD
Comment 12•4 years ago
|
||
Pushed by geoff@darktrojan.net: https://hg.mozilla.org/comm-central/rev/fdfadf3060d1 follow-up - Remove stray properties from schema. rs=bustage-fix
Comment 13•4 years ago
|
||
bugherder uplift |
Thunderbird 74.0b1:
https://hg.mozilla.org/releases/comm-beta/rev/19b769b90535
Description
•