rasa-webchat icon indicating copy to clipboard operation
rasa-webchat copied to clipboard

tooltipPayload overwrites initPayload

Open MuhannadCy opened this issue 2 years ago • 2 comments
trafficstars

I've encountered an issue and couldn't find a way to resolve it

If you pass the parameter tooltipPayload, the initPayload parameter will not trigger

I've been trying to find a workaround for this issue but I've been unable to find one

Is there a way to use the onChatOpen function to emit a message to socket to trigger the initPyaload ?

MuhannadCy avatar Aug 13 '23 07:08 MuhannadCy

okay so I've been able to resolve this by editing the file https://cdn.jsdelivr.net/npm/[email protected]/lib/index.js and commenting out the line ",a({type:"INITIALIZE"})" in the function trySendTooltipPayload

what this line was doing is setting the a variable "initialized" to true and the function trySendInitPayload checks if that variable is true it will not run, by removing that line the variable will not be set to true and the initPayload will run

MuhannadCy avatar Aug 14 '23 09:08 MuhannadCy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 15 '23 10:10 stale[bot]