arunthampi / relax

Bots-as-a-Service for Slack
Mozilla Public License 2.0
169 stars 23 forks source link

query for connected teams #33

Open yayitswei opened 7 years ago

yayitswei commented 7 years ago

Hi, first of all thanks for making Relax. We've found it very useful so far. Is there a way to list all the live connections? Would be great for making sure all the teams we expect to be connected are actually connected. If not, could you suggest a workaround?

arunthampi commented 7 years ago

@yayitswei hmm this is a good question, maybe there is a way we can expose an API endpoint that will expose this information.

Right now redisClient.HGetAll(os.Getenv("RELAX_BOTS_KEY")) returns a list of all teams but some of those teams might have "unsubscribed from your bot" so it won't give you an uptodate number. Let me think about what is the best way to approach exposing this info.