litaio / lita

ChatOps for Ruby.
https://www.lita.io
MIT License
1.68k stars 179 forks source link

Add a configurable list of users to ignore #191

Closed t33chong closed 6 years ago

t33chong commented 8 years ago

This adds a configuration option in which users to be ignored by the bot may be specified by ID, name, or mention name, preventing the possibility of an infinite loop in a chat channel where multiple bot users are present.

jimmycuadra commented 8 years ago

I love the examples. :D Generally this seems good, but could you say a bit more about the use case that prompted it? I'm guessing there was some integration in Slack that triggered a Lita handler and you want to prevent that. Since Slack has the concept of "bot" users that is exposed through the API, I wonder if there is a way Lita (or maybe just lita-slack) can have a generic "ignore bots" mechanism that doesn't force the user to do a bunch of tedious configuration of ignore lists.

t33chong commented 8 years ago

@jimmycuadra Thanks! Yeah, we have a Slack integration that tells us things like "Lita production deploy started" and it triggers our custom invalid command response because it starts with the name of the bot. I can certainly look into solving this within the lita-slack adapter, but an ignore feature could be useful for other purposes as well, like a user who is purposely spamming a channel by sending commands that trigger long responses from the bot.

jimmycuadra commented 8 years ago

like a user who is purposely spamming a channel by sending commands that trigger long responses from the bot

I see what you did there. XD

jimmycuadra commented 6 years ago

Closing cause I think https://github.com/litaio/lita-slack/issues/94 addressed the particular issue that prompted this.

AlexanderPavlenko commented 6 years ago

Slack integration that tells us things like "Lita production deploy started" and it triggers our custom invalid command response because it starts with the name of the bot

This could be prevented by changing config.robot.name to something more unique, no?