@axos-web-dev/shared-components 1.0.77-patch.41 → 1.0.77-patch.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Chatbot/Chatbot.js +3 -2
- package/package.json +1 -1
package/dist/Chatbot/Chatbot.js
CHANGED
|
@@ -93,8 +93,6 @@ const Chatbot = ({
|
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
const registerEventHandlers = () => {
|
|
96
|
-
clientRef.current?.on("ready", onReadyHandler);
|
|
97
|
-
clientRef.current?.on("authenticated", onAuthenticatedHandler);
|
|
98
96
|
clientRef.current?.on("chat.ongoing", onChatOngoingHandler);
|
|
99
97
|
clientRef.current?.on("chat.message", onChatMessageHandler);
|
|
100
98
|
clientRef.current?.on("chat.typingStarted", onChatTypingStartedHandler);
|
|
@@ -133,6 +131,8 @@ const Chatbot = ({
|
|
|
133
131
|
// or your region
|
|
134
132
|
authenticate
|
|
135
133
|
});
|
|
134
|
+
client?.on("ready", onReadyHandler);
|
|
135
|
+
client?.on("authenticated", onAuthenticatedHandler);
|
|
136
136
|
isMountedRef.current = true;
|
|
137
137
|
clientRef.current = client;
|
|
138
138
|
menuRef.current = await client.getMenus();
|
|
@@ -172,6 +172,7 @@ const Chatbot = ({
|
|
|
172
172
|
const newChat = await client.createChat(menuId, { custom_data });
|
|
173
173
|
if (newChat !== null) {
|
|
174
174
|
chatRef.current = newChat;
|
|
175
|
+
agent_virtual.current = newChat.agent;
|
|
175
176
|
console.log("Chat created id:", newChat.id);
|
|
176
177
|
}
|
|
177
178
|
} catch (err) {
|
package/package.json
CHANGED