Slack sometimes resends old messages. This can cause the bot to think it's not in a channel, when it is:
bot leaves the channel; this triggers notification left-1, which we process
bot rejoins channel; this triggers notification joined-2, which we process
slack re-sends left-1; we process this, and think we've left the room
To solve this, we now record the timestamp for each join/leave message, on a per-channel basis. If we see an event with a lower timestamp than the recorded one, we ignore it.
Slack sometimes resends old messages. This can cause the bot to think it's not in a channel, when it is:
left-1
, which we processjoined-2
, which we processleft-1
; we process this, and think we've left the roomTo solve this, we now record the timestamp for each join/leave message, on a per-channel basis. If we see an event with a lower timestamp than the recorded one, we ignore it.