[Feature] Email collect message hooks (#331)
- Add email collect hook on creating conversation - Merge contact if it already exist
This commit is contained in:
10
app/javascript/widget/api/contact.js
Executable file
10
app/javascript/widget/api/contact.js
Executable file
@@ -0,0 +1,10 @@
|
||||
import authEndPoint from 'widget/api/endPoints';
|
||||
import { API } from 'widget/helpers/axios';
|
||||
|
||||
export const updateContact = async ({ messageId, email }) => {
|
||||
const urlData = authEndPoint.updateContact(messageId);
|
||||
const result = await API.patch(urlData.url, {
|
||||
contact: { email },
|
||||
});
|
||||
return result;
|
||||
};
|
||||
Reference in New Issue
Block a user