Closed BPMJoannette closed 1 year ago
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.
Facing the same issue.
@Uttam92477 Are you still facing this issue in the more recent versions of botpress ?
This issue needs a documentation update.
It is indeed updating the userId however, we have to use mergeConfig
instead of the normal config API.
Yes you're right when you want to change anything in the config after the initialization you need to use mergeConfig. It needs a doc update. Thanks, we'll make sure to fix this properly
I currently facing the same issue. Even when using mergeConfig
in the examplary workflow described by @BPMJoannette, the value of bp/socket/user
is not changed.
Is this behavior expected, when setting a custom userId
?
When calling botpressWebChat.configure with a new user ID, the conversation is not refreshed to show the new user's.
To Reproduce Steps to reproduce the behavior:
In the embedded-webchat.html example page, add the following event listener:
In Botpress, create a before incoming middleware hook with this:
Load the embedded-webchat example, send any first message to initiate conversation.
Send "change" to trigger the hook. Note that under Control User Identity, you have been assigned a new userId
Send a third message. It is not posted back, and you don't get an answer either.
In the database I find the message is posted to the new user, but the conversation ID is not updated either. Multiple users shouldn't be able to have the same conversation ID.
Expected behavior Botpress web chat is reinitialized / refreshed with the correct user and conversation
Screenshots
Environment:
Additional context Customer related issue