Web bot implementation

Query from one of the clients:

We’re in the process of implementing the chat widget on our web app as discussed previously. When a user first comes to our webapp, he needs to log in to access our service - for this reason, we initially hide the bot from the user using “hideChatButton: true”. After the user has logged into our service, we understand who it is, and pass a payload to the bot, using init. The problem we have is that the bot still has the initial configurations in place, including “hideChatButton:true”.

At the moment, we get around this by overriding the existing configuration 5 seconds after the user logs in, using:

setTimeout(() => {
(window).YellowMessengerPlugin.show()
},5000)

However, this feels like a clumsy solution and we wondered if you know of a better way. Perhaps it’s possible to change “hideChatButton” to “false” via the payload? Or something similar?

Hey, you can use YellowMessengerPlugin.hide() to hide the bot and then YellowMessengerPlugin.show() to show the bot