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

Rest API - Slack Chat - Whether User Joined Slack Room #24

Closed
Code4SocialGood opened this issue Mar 17, 2017 · 2 comments
Closed

Rest API - Slack Chat - Whether User Joined Slack Room #24

Code4SocialGood opened this issue Mar 17, 2017 · 2 comments
Assignees

Comments

@Code4SocialGood
Copy link
Owner

Code4SocialGood commented Mar 17, 2017

@Code4SocialGood Code4SocialGood changed the title Rest API - Check Whether User Joined Slack Room Rest API - Slack Check - Whether User Joined Slack Room Mar 17, 2017
@Code4SocialGood Code4SocialGood changed the title Rest API - Slack Check - Whether User Joined Slack Room Rest API - Slack Chat - Whether User Joined Slack Room Mar 17, 2017
@arpitsrm
Copy link
Collaborator

@Code4SocialGood : So this is what I had in mind :
Since there is no API to search user by email, we will have to follow the below steps :
a. Get total usersList for our slack team using users.list webApi method
b. Then search if the particular email exists in the userlist

@Code4SocialGood
Copy link
Owner Author

  1. Search the user table by email, check whether the user is registered in Slack (add a flag column in the user table to indicate whether user joined Slack or not, column definition is not null with default 'N')
  2. If flag is Y for the user, then the endpoint returns Y
  3. If flag is N for the user, then
    a. Get total usersList for our slack team using users.list webApi method
    b. Update the flag column in user table for the users in userList from Slack
    c. Endpoint returns Y or N for the particular user requested

This logic caches the user list and saves us trip to Slack.

arpitsrm added a commit to arpitsrm/c4sg-services that referenced this issue Mar 20, 2017
Slack Chat - Whether User Joined Slack Room Code4SocialGood#24
endPoint : /api/chat/isJoinedChat
arpitsrm added a commit to arpitsrm/c4sg-services that referenced this issue Mar 21, 2017
Slack Chat - Whether User Joined Slack Room Code4SocialGood#24 Code4SocialGood#37
review changes
Code4SocialGood added a commit that referenced this issue Mar 21, 2017
Slack Chat - Whether User Joined Slack Room #24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants