You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was following the API guide to code a test chat widget until I hit a snag on the superchats. No matter what I tried it never gets triggered. I made sure that the code uses the correct listener like here:
window.addEventListener("onEventReceived", function (obj) {
// snip
if(obj.detail.listener == "superchat-latest"){
// do something here
}
}
So I opened up inspect and noticed some errors being thrown:
I looked into widget.html and noticed this particular line
Since text field is only present for messages and not anything else, it immediately throws an error and not dispatch the event. Manually editing the HTML to include an if condition fixed it.
Hopefully this can get patched soon.
The text was updated successfully, but these errors were encountered:
JasonXed
changed the title
Bug: Events other than "messages" cant be displayed
Bug: Events other than "message" cant be displayed
Feb 22, 2023
I was following the API guide to code a test chat widget until I hit a snag on the superchats. No matter what I tried it never gets triggered. I made sure that the code uses the correct listener like here:
So I opened up inspect and noticed some errors being thrown:
I looked into widget.html and noticed this particular line
Since text field is only present for messages and not anything else, it immediately throws an error and not dispatch the event. Manually editing the HTML to include an if condition fixed it.
Hopefully this can get patched soon.
The text was updated successfully, but these errors were encountered: