Skip to content

Commit 93a6baf

Browse files
authored
Merge pull request #62 from assistify/smarti#87_add_support_area_to_smarti_call
Add support-area to smarti
2 parents d5a3eb2 + 3ac051d commit 93a6baf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/dbs-ai/server/lib/Smarti.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ class SmartiAdapter {
2121

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

24+
const helpRequest = RocketChat.models.HelpRequests.findOneByRoomId(message.rid);
25+
26+
const supportArea = helpRequest ? helpRequest.supportArea : undefined;
27+
2428
const requestBody = {
2529
webhook_url: this.properties.webhookUrl,
2630
message_id: message._id,
@@ -29,7 +33,8 @@ class SmartiAdapter {
2933
// username: message.u.username,
3034
text: message.msg,
3135
timestamp: message.ts,
32-
origin: message.origin
36+
origin: message.origin,
37+
support_area: supportArea
3338
};
3439

3540
try {

0 commit comments

Comments
 (0)