- Issue created by @jan kellermann
- 🇩🇪Germany jan kellermann
The deepchat block sets the attribute
additionalBodyProps
with all data sending additional to message. While generating block we cannot add the thread id because the code is cached. So we have to inject this via JS.I added this to JS.
Please feedback and review (sorry Marcus for all the work).
- 🇩🇪Germany marcus_johansson
All good - or it's actually great to have someone outside of Vivek looking at the assistant/chatbot with two extra eyes!
I found one issue with this, its when using the "Session (Same thread on reload)". Deepchat triggers a rerender when the base element is changed causing the rerender listener to run. This will look into the drupalSettings history array and rerender what is there. This causes issues when you have written something, reloaded and then try to clear the history, since it rerenders it, even if its gone from the actual session history.
The following patch → on top of your code should take care of this. If you agree, just add it and I'll merge it.
- 🇩🇪Germany jan kellermann
Hi Marcus, great! I tested your patch and extended the MR.
Unfortunately i had to add some "hacky" code also to reload the thread_id in deepchat-object.Please review.
-
marcus_johansson →
committed 5230f5a5 on 1.0.x authored by
jan kellermann →
Resolve #3497046 "Include threadid in"
-
marcus_johansson →
committed 5230f5a5 on 1.0.x authored by
jan kellermann →
-
marcus_johansson →
committed 5230f5a5 on 3488961-headers-have-already authored by
jan kellermann →
Resolve #3497046 "Include threadid in"
-
marcus_johansson →
committed 5230f5a5 on 3488961-headers-have-already authored by
jan kellermann →
Automatically closed - issue fixed for 2 weeks with no activity.