Only include the rest of the cmdline if the cmd is an alias.

This commit is contained in:
Gareth J. Greenaway 2018-04-19 12:18:54 -07:00
parent e846df7409
commit a2840fc230
No known key found for this signature in database
GPG key ID: 10B62F8A7CAD7A41

View file

@ -353,13 +353,12 @@ class SlackClient(object):
# maybe there are aliases, so check on that
if cmdline[0] in permitted_group[1].get('aliases', {}).keys():
use_cmdline = self.commandline_to_list(permitted_group[1]['aliases'][cmdline[0]].get('cmd', ''), '')
# Include any additional elements from cmdline
use_cmdline.extend(cmdline[1:])
else:
use_cmdline = cmdline
target = self.get_target(permitted_group, cmdline, use_cmdline)
# Include any additional elements from cmdline
use_cmdline.extend(cmdline[1:])
return (True, target, use_cmdline)
def message_text(self, m_data):