Closed dblock closed 7 years ago
You should be able to specify on your side, a profile attribute where you don't meet someone with the same value
User profiles are retrieved via users_profile_get
and require a scoped access token, added in https://github.com/dblock/slack-sup/commit/654af305945716da99c47d6b96fdb34aa8091167 (also see https://github.com/slack-ruby/slack-ruby-bot-server/issues/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)
This was implemented in https://github.com/dblock/slack-sup/commit/bf119b75db14b507855beefbbfa491cb26d981c8, @orta all we need to is to sync the data into Slack.
cc: @orta, this is where we'd want team information in a custom field in slack