slack-ruby-client icon indicating copy to clipboard operation
slack-ruby-client copied to clipboard

Duplicate messages in 'client.on :file_comment_added'

Open gsamat opened this issue 8 years ago • 4 comments

We are listening to file comments via this code in Ruby:

    client.on :file_comment_added do |data|
      puts "OLOLOLOLO++++++ #{data}"

On the March 11 we suddenly started seeing duplicate messages every time someone leaves comment to a file.

Please take a look at two debug lines from the code above:

2017-03-14_12:36:25.64522 OLOLOLOLO++++++ comment=channel=, comment=222, created=1489494985, id=Fc4JMZ5747, is_intro=false, timestamp=1489494985, user=U02UC6B7U, event_ts=1489494985.415397, file=id=F4HA28XAL, file_id=F4HA28XAL, type=file_comment_added, user_id=U1RM1CY1W

2017-03-14_12:36:28.93747 OLOLOLOLO++++++ comment=channel=, comment=222, created=1489494985, id=Fc4JMZ5747, is_intro=false, timestamp=1489494985, user=U02UC6B7U, event_ts=1489494985.146213, file=id=F4HA28XAL, file_id=F4HA28XAL, ts=1489494985.146213, type=file_comment_added, user_id=U1RM1CY1W

The only difference in data is that the first entry is missing ts field and the second has it.

Is this intended behaviour or rather a bug introduced on March 11, 2017 in Slack API? We were using older version of slack-ruby-client, but updated since and nothing changed.

gsamat avatar Mar 22 '17 14:03 gsamat

Have you opened a ticket with Slack on this? Looks like there's a notification with a timestamp and another one without, I am going to vote that this is as a slack bug, but you never know ;)

dblock avatar Mar 23 '17 01:03 dblock

Yes, the first thing. Real Time Messaging API : duplicate messages Support Request #1276164

But then support rep directed me here :(

Were you able to reproduce it?

I think I will try to escalate this support request, looks like some misunderstanding.

gsamat avatar Mar 23 '17 06:03 gsamat

Yeah sorry I don't work for Slack. Reproducing it sounds like a good step forward.

dblock avatar Mar 23 '17 11:03 dblock

Yeah, sorry about that.

We actually used some duct tape, not interested in digging further. Maybe Slack should investigate.

gsamat avatar Mar 23 '17 13:03 gsamat