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

Give users an option to not meet certain people, such as in their team #5

Closed
dblock opened this issue Aug 17, 2017 · 3 comments
Closed

Comments

@dblock
Copy link
Owner

dblock commented Aug 17, 2017

cc: @orta, this is where we'd want team information in a custom field in slack

@orta
Copy link

orta commented Aug 18, 2017

You should be able to specify on your side, a profile attribute where you don't meet someone with the same value

@dblock
Copy link
Owner Author

dblock commented Aug 21, 2017

User profiles are retrieved via users_profile_get and require a scoped access token, added in 654af30 (also see slack-ruby/slack-ruby-bot-server#66).

team = Team.last

client = Slack::Web::Client.new(token: team.token)
members = client.paginate(:users_list, presence: false).map(&:members).flatten
dblock = members.detect { |m| m.name == 'dblock' }

client = Slack::Web::Client.new(token: team.access_token)
profile = client.users_profile_get(user: dblock.id)

@dblock dblock closed this as completed in bf119b7 Aug 21, 2017
@dblock
Copy link
Owner Author

dblock commented Aug 21, 2017

This was implemented in bf119b7, @orta all we need to is to sync the data into Slack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants