mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 19:48:08 +00:00
Feature: Customise widget for bot conversations (#834)
* Feature: Customise widget for bot conversations
This commit is contained in:
@@ -13,12 +13,16 @@ const sendAttachmentAPI = async attachment => {
|
||||
return result;
|
||||
};
|
||||
|
||||
const getConversationAPI = async ({ before }) => {
|
||||
const getMessagesAPI = async ({ before }) => {
|
||||
const urlData = endPoints.getConversation({ before });
|
||||
const result = await API.get(urlData.url, { params: urlData.params });
|
||||
return result;
|
||||
};
|
||||
|
||||
const getConversationAPI = async () => {
|
||||
return API.get(`/api/v1/widget/conversations${window.location.search}`);
|
||||
};
|
||||
|
||||
const toggleTyping = async ({ typingStatus }) => {
|
||||
return API.post(
|
||||
`/api/v1/widget/conversations/toggle_typing${window.location.search}`,
|
||||
@@ -26,4 +30,10 @@ const toggleTyping = async ({ typingStatus }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export { sendMessageAPI, getConversationAPI, sendAttachmentAPI, toggleTyping };
|
||||
export {
|
||||
sendMessageAPI,
|
||||
getConversationAPI,
|
||||
getMessagesAPI,
|
||||
sendAttachmentAPI,
|
||||
toggleTyping,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user