messenger.messages.update vs messenger.messages.onUpdated
Categories
(Thunderbird :: Add-Ons: Extensions API, task)
Tracking
(Not tracked)
People
(Reporter: buecher, Unassigned)
Details
documentation: it may be worth mentioning that messenger.messages.update does not always trigger messenger.messages.onUpdated.
The first can be called with the current values, not changing anything. Then, the event is not triggered.
This is related to our discussion of preparing a stack so that in onUpdate we know that we ourselves did the update. But if I fill the stack by messages.update, it cannot be cleared if onUpdated is not triggered, opening a new can of worms because now messageIds stay in the stack.
Comment 1•7 months ago
|
||
If the message was not changed, then I cannot fire an messages.onUpdated
event. The approach here is to not update the message in your scenario, if the message will not be changed by the call. You can check the current state before calling messages.update()
Description
•