Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out why Gilda posts howdy message before user actually seems to join #14

Open
joekr opened this issue Jun 7, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@joekr
Copy link
Member

joekr commented Jun 7, 2020

We have seen two cases where Gilda posts a message before the user seems to actually join the channel. I'm not sure if there is much we can do about it since Slack is sending the events to us but worth looking into.

History

Screen Shot 2020-06-07 at 1 12 34 PM

Oddly enough we see the message at 11:24 ET and the slack event was sent at 1591500248.379100 Sunday, June 7, 2020 3:24:08.379 AM GMT

The function logged it at 2020-06-07 03:24:42,798 UTC
Then I see 3 times the function is sent the event:

  1. 2020-06-07 03:24:42,798 UTC
  2. 2020-06-07 03:24:42,821 UTC
  3. 2020-06-07 03:25:14,212 UTC
    so I’m not sure why slack wouldn’t show in the channel until 12:50 AM ET
@joekr joekr added the bug Something isn't working label Jun 7, 2020
@xtoddx
Copy link
Contributor

xtoddx commented Jun 7, 2020

My theory is that for channels that are auto-joined upon account creation, we're actually seeing the account creation send the channel joined notification. When users boot the app at some later point it actually shows up in the client.

Is there a user presence notification? We can pend the welcome message until we see the user come online, etc.

@joekr
Copy link
Member Author

joekr commented Jun 7, 2020

Possibly use this event: https://api.slack.com/events/user_change given that when they signup/sigin they are updating their user. 🤷

I'm thinking we could subscribe to a few different events, log them and see what is sent

@joekr
Copy link
Member Author

joekr commented Jun 13, 2020

I think I found it. I think the event we want is https://api.slack.com/events/message/channel_join. This could be sent at the same time we see the joined #random. message.

Update: Nope. I don't think that event exists anymore. Or anyway I can't figure out how to add that event.

@xtoddx
Copy link
Contributor

xtoddx commented Jun 14, 2020

channel_join is RTM (real-time messaging) and not events api.

Side-by-side comparison here: https://api.slack.com/events?nojsmode=1

Which led me to https://api.slack.com/events/member_joined_channel?nojsmode=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants