Add wildcard support for messages.query(queryInfo.subject)
Categories
(Thunderbird :: Add-Ons: Extensions API, enhancement)
Tracking
(Not tracked)
People
(Reporter: mihaicodrean, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0
Steps to reproduce:
I'm using the messages.query API, and would like to filter by a subject prefix.
Actual results:
The results only include exact matches.
Expected results:
With proper API support, return all matches.
The existing code in ext-messages.js hints that this might already work:
// Check subject (substring match).
if (
queryInfo.subject &&
!msg.mime2DecodedSubject.includes(queryInfo.subject)
) {
return false;
}
OK, this is embarrassing, but I had double-quotes around the entire expression I was searching by, included in the actual string. Maybe I did that as an experiment (no pun) for the early API four years ago, as discussed here: https://bugzilla.mozilla.org/show_bug.cgi?id=1531317#c24
Please feel free to close/delete this bug report.
(In reply to Mihai from comment #2)
I had double-quotes around the entire expression I was searching by, included in the actual string. Maybe I did that as an experiment (no pun) for the early API four years ago, as discussed here: https://bugzilla.mozilla.org/show_bug.cgi?id=1531317#c24
Or maybe that's how things worked in the API at some point... I can't remember.
In any case, it works as expected w/out the embedded quotes.
Updated•3 years ago
|
Comment 4•3 years ago
|
||
I cannot say something like that never happened to me :-)
Description
•