Skip to content

Commit

Permalink
found another place where the legacy/rocket.chat service is called
Browse files Browse the repository at this point in the history
  • Loading branch information
ja-fra committed Feb 20, 2018
1 parent 79a096d commit 3e091be
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/assistify-ai/server/lib/SmartiAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,13 @@ export class SmartiAdapter {
conversationId = m.conversationId;
} else {
SystemLogger.debug('Smarti - Trying legacy service to retrieve conversation ID...');
const conversation = SmartiProxy.propagateToSmarti(verbs.get, `legacy/rocket.chat?channel_id=${ room._id }`);
const conversation = SmartiProxy.propagateToSmarti(verbs.get,
`legacy/rocket.chat?channel_id=${ room._id }`, null, (error) => {
// 404 is expected if no mapping exists
if (error.response.statusCode === 404) {
return null;
}
});
if (conversation && conversation.id) {
conversationId = conversation.id;
}
Expand Down

0 comments on commit 3e091be

Please sign in to comment.