mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 11:37:58 +00:00
Feature: Rich Message Types (#610)
Co-authored-by: Pranav Raj S <pranavrajs@gmail.com> Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
This commit is contained in:
@@ -30,7 +30,7 @@ const getConversation = ({ before }) => ({
|
||||
params: { before },
|
||||
});
|
||||
|
||||
const updateContact = id => ({
|
||||
const updateMessage = id => ({
|
||||
url: `/api/v1/widget/messages/${id}${window.location.search}`,
|
||||
});
|
||||
|
||||
@@ -45,6 +45,6 @@ export default {
|
||||
sendMessage,
|
||||
sendAttachmnet,
|
||||
getConversation,
|
||||
updateContact,
|
||||
updateMessage,
|
||||
getAvailableAgents,
|
||||
};
|
||||
|
||||
7
app/javascript/widget/api/events.js
Normal file
7
app/javascript/widget/api/events.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import { API } from 'widget/helpers/axios';
|
||||
|
||||
export default {
|
||||
create(name) {
|
||||
return API.post(`/api/v1/widget/events${window.location.search}`, { name });
|
||||
},
|
||||
};
|
||||
@@ -2,10 +2,11 @@ import authEndPoint from 'widget/api/endPoints';
|
||||
import { API } from 'widget/helpers/axios';
|
||||
|
||||
export default {
|
||||
update: ({ messageId, email }) => {
|
||||
const urlData = authEndPoint.updateContact(messageId);
|
||||
update: ({ messageId, email, values }) => {
|
||||
const urlData = authEndPoint.updateMessage(messageId);
|
||||
return API.patch(urlData.url, {
|
||||
contact: { email },
|
||||
message: { submitted_values: values },
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user