Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

messageDisplay fails on 128.6 #37

Open
notoken opened this issue Jan 2, 2025 · 3 comments
Open

messageDisplay fails on 128.6 #37

notoken opened this issue Jan 2, 2025 · 3 comments

Comments

@notoken
Copy link

notoken commented Jan 2, 2025

Hi,

According to the API documentation, messageDisplay (https://webextension-api.thunderbird.net/en/latest/messageDisplay.html) is still supported in TB 128. However, when I try to load the messageDisplay or messageDisplayScript example as a temporary add-on, I encounter the following error:

TypeError: browser.messageDisplay.onMessageDisplayed is undefined

Am I overlooking something here?

Thanks in advance for your help!

@jobisoft
Copy link
Contributor

jobisoft commented Jan 2, 2025

In Manifest V3 we only have browser.messageDisplay.onMessagesDisplayed (plural). I will check what is wrong with the example. Thanks for flagging this.

@notoken
Copy link
Author

notoken commented Jan 2, 2025

Thanks for the quick response! Switching from onMessageDisplayed to onMessagesDisplayed does resolve the TypeError, but the script's behavior seems incorrect. It only calls the listener once with an empty message, rather than every time a message is displayed as described in the API documentation.

Any ideas on what might be going wrong?

@jobisoft
Copy link
Contributor

jobisoft commented Jan 2, 2025

Could it be, that in Manifest V3 the event returns a messageList? It would then have a messages object, with the first page of messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants