Refactor Conversation, Message API calls, store
This commit is contained in:
parent
c21c839dca
commit
170f8716c5
13 changed files with 215 additions and 402 deletions
24
app/javascript/dashboard/api/channel/fbChannel.js
Normal file
24
app/javascript/dashboard/api/channel/fbChannel.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
/* global axios */
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
class FBChannel extends ApiClient {
|
||||
constructor() {
|
||||
super('facebook_indicators');
|
||||
}
|
||||
|
||||
markSeen({ inboxId, contactId }) {
|
||||
return axios.post(`${this.url}/mark_seen`, {
|
||||
inbox_id: inboxId,
|
||||
contact_id: contactId,
|
||||
});
|
||||
}
|
||||
|
||||
toggleTyping({ status, inboxId, contactId }) {
|
||||
return axios.post(`${this.url}/typing_${status}`, {
|
||||
inbox_id: inboxId,
|
||||
contact_id: contactId,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default new FBChannel();
|
Loading…
Add table
Add a link
Reference in a new issue