From 0e068ffaca2b0685dd5eb74556901da7e038bfcb Mon Sep 17 00:00:00 2001
From: Diego Dorgam <diego.dorgam@rocket.chat>
Date: Tue, 12 Dec 2017 13:53:40 -0200
Subject: [PATCH] fix global.config.interactions for `next` tag use. closes #25

---
 scripts/bot/index.coffee | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/bot/index.coffee b/scripts/bot/index.coffee
index 785ed00..17e7801 100644
--- a/scripts/bot/index.coffee
+++ b/scripts/bot/index.coffee
@@ -79,7 +79,7 @@ classifyInteraction = (interaction, classifier) ->
     if Array.isArray interaction.next?.interactions
       interaction.next.classifier = new natural.LogisticRegressionClassifier(PorterStemmer)
       for nextInteractionName in interaction.next.interactions
-        nextInteraction = config.interactions.find (n) ->
+        nextInteraction = global.config.interactions.find (n) ->
           return n.name is nextInteractionName
         if not nextInteraction?
           console.log 'No valid interaction for', nextInteractionName
-- 
GitLab