| Conditions | 1 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 2 |
| 1 | import os |
||
| 16 | def run(self, text, source_channel=None, user=None): |
||
| 17 | alias_match = ActionAliasMatch() |
||
| 18 | alias_match.command = text |
||
| 19 | alias, representation = self.client.managers['ActionAlias'].match( |
||
| 20 | alias_match) |
||
| 21 | |||
| 22 | execution = ActionAliasExecution() |
||
| 23 | execution.name = alias.name |
||
| 24 | execution.format = representation |
||
| 25 | execution.command = text |
||
| 26 | execution.source_channel = source_channel # ? |
||
| 27 | execution.notification_channel = None |
||
| 28 | execution.notification_route = None |
||
| 29 | execution.user = user |
||
| 30 | |||
| 31 | action_exec_mgr = self.app.client.managers['ActionAliasExecution'] |
||
| 32 | |||
| 33 | execution = action_exec_mgr.create(execution) |
||
| 34 | return execution.execution['id'] |
||
| 35 |