Conversation
I have the desire to have commands be executed even when not directed at the bot ( I could have started modifying the Currently, the "path" of the main handler is Changing this in code isn't a big deal, but it will affect persisted data, as the key path today is This might open up the ability to store each alias as it's own key->hash, instead of all keys living inside one hget key. Something like:
These all live inside the scope of the I think this is a longer topic, probably out of scope for this change, but wanted to kick it off with @apsoto . |
(Also, @apsoto - no idea why a travis build wasn't triggered for the pull request - that's very odd.) |
Works with exisiting aliases and extends the command syntax to capture the global flag and pass that along to AliasedCommand. Updates `add_alias_route` to make the decision on whether it should match a command or message listener. Not working yet: after restarting process, load_aliases does not register global aliases, as the state is not persisted.
9dd0b8b
to
46afce7
Compare
Removes an extra object cast.
Discovered with mutant testing, bringing this class to 100% free of mutants! It's unlikely that we would ever generate an AliasedCommand without a name attribute, but if it ever happened, this test would uncover that.
I made the conscious decision to namespace things that way because there was more than just a single handler class. |
In regards to the |
Re: namespacing, sure thing, wanted to float the concept by you. I don't think there's any problem there. For global, with Slack adapters we cannot use the Our current practices using hubot's alias scripts allowed for global aliases, so we evolved to using commands like |
My first thought is whether to make this a config value ( Let me run this against a slack room so I can get a feel for your use case. |
I tried with slack, and I used '!' as the alias and it worked executing the aliases without having to address the bot user.
Does that help solve things for you? |
Works with exisiting aliases and extends the command syntax to capture
the global flag and pass that along to AliasedCommand.
Updates
add_alias_route
to make the decision on whether it should matcha command or message listener.
Not working yet: after restarting process, load_aliases does not register
global aliases, as the state is not persisted.