mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Handle trigger the same way as slack engine
This commit is contained in:
parent
2075ddb9cb
commit
f6030b6f32
@ -51,7 +51,6 @@ def __virtual__():
|
||||
return HAS_HYPCHAT
|
||||
|
||||
|
||||
COMMAND_NAME = 'salt'
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@ -133,9 +132,9 @@ def start(token,
|
||||
''' yield partner message '''
|
||||
for message in all_messages:
|
||||
message_text = message['message']
|
||||
if message_text.startswith(trigger + COMMAND_NAME + ' '):
|
||||
if message_text.startswith(trigger):
|
||||
fire(tag, message)
|
||||
text = message_text.replace(trigger + COMMAND_NAME + ' ', '').strip()
|
||||
text = message_text.replace(trigger, '').strip()
|
||||
yield message['from']['mention_name'], text
|
||||
|
||||
if not token:
|
||||
|
Loading…
Reference in New Issue
Block a user