https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Listening_for_load_and_unload#options.loadReason provides a (indirect) way to listen for an add-on upgrade event (loadReason == “upgrade”).
Is there a programmatic way to detect whether the upgrade was user-initiated, or was an auto-update?
a) User-initiated (user goes to my web site and installs the latest version of the add-on): once the new version is loaded, I’d like to pop a new tab/URL that says “Thank you for upgrading…”
b) Auto-update (em:updateURL…/update.rdf): No user messaging.
However, in both the a) and b) scenarios, my exports.main() is seeing loadReason == “upgrade”, so I don’t know how to distinguish between the two.
Any workaround suggestions?
TIA