Open ekilah opened 8 years ago
I will have to test again - for now, I've stopped trying to use the unhandled message handler.
However, this does sound a bit related to https://github.com/litaio/lita-slack/pull/90 so maybe it is resolved / a similar thing. I will try and test this theory and play with this more when I have some free time...
Context: this is ported over from a conversation at https://github.com/litaio/lita/issues/197
It seems that the Slack RTM connection always re-receives the last message that was sent by Lita when restarting the Lita process after a deploy.
I'm noticing this while trying to implement a
:unhandled_message
event handler in my custom Lita handler.To clarify, here's the sequence I see:
The last line is produced by my
on(:unhandled_message)
block. Can anyone else replicate this behavior? It seems like a bug to me... or, at least, something that the adapter should filter out since it might be slack's "fault" (or feature)? I have yet to narrow down the cause. I'm a new Lita user.I could probably work around it by seeing if the message was sent by the bot (sorta related to https://github.com/litaio/lita-slack/pull/95), but it seems like this shouldn't be necessary? I can also make this not happen as often by filtering by
command?
in theunhandled_message
block, but that doesn't prevent DMs from suffering from this if that's where lita's last message went.Lita logs showing this behavior: (my comments are prefixed by
#
s)