Skip to content
Snippets Groups Projects
Commit 78d01184 authored by Diego Sampaio's avatar Diego Sampaio
Browse files

Correctly trim hubot script names

parent 7d8ac326
No related branches found
No related tags found
No related merge requests found
......@@ -166,10 +166,12 @@ class HubotScripts
console.log "can't load #{modulePath}".red
console.log e
scriptsToLoad = RocketChat.settings.get('InternalHubot_ScriptsToLoad').replace(' ', '').split(',') or []
scriptsToLoad = RocketChat.settings.get('InternalHubot_ScriptsToLoad').split(',') or []
for scriptFile in scriptsToLoad
try
scriptFile = s.trim(scriptFile)
Npm.require('hubot-scripts/src/scripts/'+scriptFile)(robot)
# robot.loadFile __meteor_bootstrap__.serverDir+'/npm/rocketchat_internal-hubot/node_modules/hubot-scripts/src/scripts', scriptFile
robot.parseHelp __meteor_bootstrap__.serverDir+'/npm/rocketchat_internal-hubot/node_modules/hubot-scripts/src/scripts/'+scriptFile
......
......@@ -13,6 +13,7 @@ Package.onUse(function(api) {
'tracker',
'rocketchat:lib'
]);
api.use('underscorestring:underscore.string');
api.use('templating', 'client');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment