fossasia / susi_slackbot

Ask Susi Messengers http://susi.ai
GNU Lesser General Public License v2.1
1.5k stars 26 forks source link

Iterate over actions instead of matching one by one #45

Closed hkedia321 closed 6 years ago

hkedia321 commented 6 years ago

The SUSI server returns an array of objects - actions. Current Behaviour: The type (answer,rss,table, etc) is checked separately and their positions in the array is pre-assumed. https://github.com/fossasia/susi_slackbot/blob/development/index.js#L34 Expected Behaviour: loop through the actions array and for each type of action, implement suitable response.