Skip to content

Commit

Permalink
smarti#87 add support area to smarti
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Kurz committed Sep 26, 2017
1 parent d5a3eb2 commit 3ac051d
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 3ac051d

Please sign in to comment.