Skip to content

Commit

Permalink
Merge pull request #62 from assistify/smarti#87_add_support_area_to_s…
Browse files Browse the repository at this point in the history
…marti_call

Add support-area to smarti
  • Loading branch information
mrsimpson authored Sep 27, 2017
2 parents d5a3eb2 + 3ac051d commit 93a6baf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/dbs-ai/server/lib/Smarti.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ class SmartiAdapter {

//TODO is this always a new one, what about update

const helpRequest = RocketChat.models.HelpRequests.findOneByRoomId(message.rid);

const supportArea = helpRequest ? helpRequest.supportArea : undefined;

const requestBody = {
webhook_url: this.properties.webhookUrl,
message_id: message._id,
Expand All @@ -29,7 +33,8 @@ class SmartiAdapter {
// username: message.u.username,
text: message.msg,
timestamp: message.ts,
origin: message.origin
origin: message.origin,
support_area: supportArea
};

try {
Expand Down

0 comments on commit 93a6baf

Please sign in to comment.