-
Notifications
You must be signed in to change notification settings - Fork 14.1k
feat: improve embedding sys.user_id and conversion id info usage #18035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: improve embedding sys.user_id and conversion id info usage #18035
Conversation
very useful fix then we can create chatbot that aware if WordPress user is logged in or not |
Please approve this pull because I need this issue to fixed so my chatbot iframe can pass logged in user information from my WordPress site |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
will this pull be merged ? is there anyone answer me please |
Hi @asrguru20 , would like to check with you, do we have documentation on how to implement in the difyChatbotConfig so that user_id is passed dynamically according to the logged in user? Thanks in advanced. |
So far, I have initiated two PRs to handle the custom sys.user_id issue, one landed in v1.2 #16062, and the other landed in v1.3 #18035. The following are my personal suggestions based on v1.3: If you do not need to customize If you need to dynamically handle sys.user_id, please handle it according to the situation: For the case of directly loading the iframe, please try to destroy the iframe and then create a new iframe using the new URL; For the case of using If there are any problems, please open a new issue and use a new app to specifically describe the reproduction steps. |
Hi @ModyQyW , the URL you meant is the public URL (as attached)? ![]() 1. As in, for every change of user_id, the public URL also need to regenerate? 2. Based on your enhancement, are we able to achieve something like this:- a) user A login window.difyChatbotConfig = { b) user B login window.difyChatbotConfig = { c) when user A login again, still able to view own previous conversation |
It's better to have a prefix on the local storage that the embed iframes produced,so that we can remove them easily instead destroying iframe and reload the page. |
👋 Hi @vivianxe-ifast
User A with The core difference can be seen in the part after the If you update
My English is a bit poor, I hope I can explain everything clearly to you. Thanks, hope this helps! 🙏 |
Sorry but I don't get your point. Could you provide an example to further illustrate please? Thank you! 🙏 |
Summary
This PR improves embedding sys.user_id and conversation id info usage. Remove getPublicToken method as it is not used.
Close #17870.
Screenshots
Checklist
Important
Please review the checklist below before submitting your pull request.
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint gods