Closed Kothakapu closed 7 years ago
Hey @Kothakapu,
You'd add this on your client side. The connector is storing conversation data with keys that are built using conversationId, channelId and userId. In the webchat sample, the user's id defaults to 'userid' (see code below). If you want to customize data per user, you would set your own userId per instance of webchat. This user id might be based on a user logged into your page or it could just be a GUID you create for each session that opens the page.
var user = { id: params['userid'] || 'userid', name: params["username"] || 'username' };
I was just able to accomplish this by changing the id line above to:
id: Math.random().toString(36).substring(7),
This should solve your problem! Let me know if you have any issues.
Best, Ryan
Hi! I use random ids, but it still doesn't solve the problem. When a user replies to my chatbot, all the users receive an answer. It doesn't do it with DirectLine online. Any idea?
Thank you :)
Hi Ryan,
Thanks for providing code and it's working fine when we do single user chat conversation with bot. Could you please suggest the place where do we need to add logic to handle multi user conversation at a time with bot.
Thanks in advance.
Thanks & Regards, Satheesh K.