mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 03:27:52 +00:00
Feat: Assign conversations to teams. (#1849)
This commit is contained in:
committed by
GitHub
parent
941d4219f0
commit
c99c63cd79
@@ -33,12 +33,17 @@ class ConversationApi extends ApiClient {
|
||||
}
|
||||
|
||||
assignAgent({ conversationId, agentId }) {
|
||||
axios.post(
|
||||
return axios.post(
|
||||
`${this.url}/${conversationId}/assignments?assignee_id=${agentId}`,
|
||||
{}
|
||||
);
|
||||
}
|
||||
|
||||
assignTeam({ conversationId, teamId }) {
|
||||
const params = { team_id: teamId };
|
||||
return axios.post(`${this.url}/${conversationId}/assignments`, params);
|
||||
}
|
||||
|
||||
markMessageRead({ id }) {
|
||||
return axios.post(`${this.url}/${id}/update_last_seen`);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ describe('#ConversationAPI', () => {
|
||||
expect(conversationAPI).toHaveProperty('delete');
|
||||
expect(conversationAPI).toHaveProperty('toggleStatus');
|
||||
expect(conversationAPI).toHaveProperty('assignAgent');
|
||||
expect(conversationAPI).toHaveProperty('assignTeam');
|
||||
expect(conversationAPI).toHaveProperty('markMessageRead');
|
||||
expect(conversationAPI).toHaveProperty('toggleTyping');
|
||||
expect(conversationAPI).toHaveProperty('mute');
|
||||
|
||||
Reference in New Issue
Block a user