dblock / slack-strava

(Re)Post Strava activities to Slack
https://slava.playplay.io
MIT License
37 stars 6 forks source link

Send a welcome e-mail #32

Open dblock opened 6 years ago

dblock commented 6 years ago

For now manual, getting the user that installed the bot.

Team.active.each do |team|
  next unless team.activated_user_id
  client = Slack::Web::Client.new(token: team.token)
  info = client.users_info(user: team.activated_user_id)
  next unless info.user && info.user.profile
  puts "#{info.user.profile.display_name} <#{info.user.profile.email}>" 
end; nil