litaio / lita-slack

A Slack adapter for Lita.
MIT License
141 stars 130 forks source link

Lita bot ignores messages send via api keys #137

Open cohenaj194 opened 5 years ago

cohenaj194 commented 5 years ago

This may be a feature, but I am looking for a workaround or a method to disable a default function in the lita-slack bot.

I'm migrating from lita hipchat to lita slack and am having issues with certain commands. I have two scripts that automatically interact with my bot. They use an api keys to send a message to the bot and expect to receive a response. However, it seems that unlike the hipchat version of the bot, the lita slack will not respond to messages send via api keys.

  1. It appears I cannot have bot to bot im channels so I cannot have one bot interact with another.
  2. Using a legacy token or an Incoming Webhook to send a message is able to open an im channel to the bot and send out commands. However, these are ignored by the bot which only produces the log line: [] [DEBUG] desktop_notification event received from Slack and will be ignored.
  3. Using a legacy token or an Incoming Webhook to message a room the bot is in also produces the same desktop_notification log without any response.

It seems that only messages send to the bot directly from user chat input will trigger the bot.

Is there a way to have the bot respond to api key messages and stop ignoring them? Is there another better way to replicate user input in a method that the bot will respond to?

pgoddardr commented 3 years ago

This post is quite old, but did you ever figure out how to get the bot-to-bot interaction working with the desktop_notification event?

jrcasso commented 3 years ago

I've run into a similar issue. I'm trying to create some end-to-end tests to validate behavior but the inability to invoke commands from another "bot" (my e2e tests). @jimmycuadra do you have any guidance on this?