diff --git a/lib/conversation.ts b/lib/conversation.ts index 060e96e9..0b7d249c 100644 --- a/lib/conversation.ts +++ b/lib/conversation.ts @@ -142,8 +142,7 @@ export default class Conversation { withRunningAssignmentRules = false, }: AssignConversationData) { const url = `/${this.baseUrl}/${id}${ - withRunningAssignmentRules ? '/run_assignment_rules' : '' - }/parts`; + withRunningAssignmentRules ? '/run_assignment_rules' : '/parts'}`; const data: AssignConversationRequest | undefined = withRunningAssignmentRules ? undefined diff --git a/test/unit/conversation.test.ts b/test/unit/conversation.test.ts index 3a3c628d..5feab871 100644 --- a/test/unit/conversation.test.ts +++ b/test/unit/conversation.test.ts @@ -321,7 +321,7 @@ describe('conversations', () => { const expectedReply = {}; nock('https://api.intercom.io') - .post(`/conversations/${id}/run_assignment_rules/parts`) + .post(`/conversations/${id}/run_assignment_rules`) .reply(200, expectedReply); const client = new Client({