@zero-library/chat-agent 2.1.1 → 2.1.2
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/index.cjs.js +4 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +4 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -657,7 +657,7 @@ function createChatStore() {
|
|
|
657
657
|
const resolveConversationId = async (receiverId, strategy = 2) => {
|
|
658
658
|
if (strategy === 1) {
|
|
659
659
|
const { data } = await conversationRecentQuery({
|
|
660
|
-
receiverId
|
|
660
|
+
receiverId,
|
|
661
661
|
receiverType: 3,
|
|
662
662
|
businessId: config.params.businessId,
|
|
663
663
|
businessType: config.params.businessType
|
|
@@ -665,7 +665,7 @@ function createChatStore() {
|
|
|
665
665
|
return data;
|
|
666
666
|
} else {
|
|
667
667
|
const { data } = await conversationCreate({
|
|
668
|
-
receiverId
|
|
668
|
+
receiverId,
|
|
669
669
|
receiverType: 3,
|
|
670
670
|
businessId: config.params.businessId,
|
|
671
671
|
businessType: config.params.businessType,
|
|
@@ -739,6 +739,7 @@ function createChatStore() {
|
|
|
739
739
|
} finally {
|
|
740
740
|
}
|
|
741
741
|
config.hooks?.onAfterInitMessages?.(conversation.messages[conversationId].message);
|
|
742
|
+
config.hooks?.onAfterInit?.();
|
|
742
743
|
}
|
|
743
744
|
};
|
|
744
745
|
const pickReceiver = () => {
|
|
@@ -1828,7 +1829,7 @@ var layouts_default = react.forwardRef(({ theme, params, userInfo, hooks, layout
|
|
|
1828
1829
|
return;
|
|
1829
1830
|
}
|
|
1830
1831
|
if (config?.receiverId && config?.receiverType === 3) {
|
|
1831
|
-
chatStore.switchAgentConversation(config.receiverId, config.conversationStrategy);
|
|
1832
|
+
chatStore.switchAgentConversation(String(config.receiverId), config.conversationStrategy);
|
|
1832
1833
|
}
|
|
1833
1834
|
}, [config]);
|
|
1834
1835
|
react.useEffect(() => {
|