WX API for marking a mail as spam or ham
Categories
(Thunderbird :: Add-Ons: Extensions API, enhancement)
Tracking
(thunderbird_esr68 fixed)
Tracking | Status | |
---|---|---|
thunderbird_esr68 | --- | fixed |
People
(Reporter: hermar05, Assigned: hermar05)
References
Details
Attachments
(2 files, 6 obsolete files)
5.94 KB,
patch
|
darktrojan
:
review+
|
Details | Diff | Splinter Review |
6.08 KB,
patch
|
darktrojan
:
review+
wsmwk
:
approval-comm-esr68+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36
Steps to reproduce:
I tried marking a mail as spam
Actual results:
nothing since it cant be done as of now
Expected results:
a function which allows the webextension to mark a mail as spam
Fallen was guiding me to extend the possible options in the update function...
But I dont know how to build a patch out of it...
I dont know if thats the way its wanted but I tried adding some test cases...
modified rows: 117, 128-130, 150, 178-180
Updated•5 years ago
|
Comment 5•5 years ago
|
||
Marvin, can you submit it these as a patch?
Comment 8•5 years ago
|
||
Comment 9•5 years ago
|
||
Magnus, your thoughts on comment 8's questions?
Comment 10•5 years ago
|
||
(In reply to Geoff Lankow (:darktrojan) from comment #8)
This line should be "equal(message.getStringProperty("junkscore"), 100);"
On reflection, getProperty
would probably be more appropriate!
Updated•5 years ago
|
Comment 11•5 years ago
|
||
Good question... in general APIs should not cause such side effects, but do exactly what you say and nothing more. That does raise the question of how to get the side effects for the cases when you do want them. Maybe that needs to be a separate API like processMessage()?
Assignee | ||
Comment 12•5 years ago
|
||
maybe I can give some perspektive to the raised questions from my point of view:
-
If we mark a message as junk, should we automatically mark it as read like the UI does? (depending on the user's prefs)
No, I think that because it (most likely) willl be set by an extension the user should take notice of that mail because the extension might be wrong -
What about moving it to the junk folder automatically? (depending on the user's prefs)
No, same point as above and because I just look roughly through the spam folder and then press "delete all" -
Same questions, but in reverse, if we mark a message as not junk.
If we mark it as not spam to mark it as unread too? only thing that comes to mind would be to get the attention of the user... but if said mail is still in the spam folder it wouldnt make much difference... -
On my IMAP server, if I mark a message as both not junk and not read, only one applies. We need to figure out what's going on with that.
agreed
Assignee | ||
Comment 13•5 years ago
|
||
Comment 14•5 years ago
|
||
Patches combined, white-space fixed. I think this is good to go.
Updated•5 years ago
|
Comment 15•5 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/e1257b911bd1
Extend messages.update API function to mark messages as junk or not junk. r=darktrojan DONTBUILD
Updated•5 years ago
|
Assignee | ||
Comment 16•5 years ago
|
||
worked fine for a couple of days but now the spam symbol just lights up for a second then vanishes again...
Comment 18•5 years ago
|
||
(In reply to Geoff Lankow (:darktrojan) from comment #8)
- If we mark a message as junk, should we automatically mark it as read like
the UI does? (depending on the user's prefs)- What about moving it to the junk folder automatically? (depending on the
user's prefs)- Same questions, but in reverse, if we mark a message as not junk.
Personally I think this shouldn't automatically happen if an extension does it. What we can do is expose the setting if junk emails should be marked read or moved to the junk folder, then let the extension handle it. This might be a few calls more, but allows for more use cases where the moving or marking read might not be intended.
Either that, or maybe some flag that controls if such automatic actions should happen.
Comment 19•5 years ago
|
||
This has been in beta since 73. Let's move it on.
Comment 20•5 years ago
|
||
Comment 21•5 years ago
|
||
Thunderbird 68.7: https://hg.mozilla.org/releases/comm-esr68/rev/fa017d488bd07cc3547dfaf2cd145a923889eff5
Description
•