Open samhh opened 1 year ago
This'd make the project more immediately useful to consumers beyond Unsplash. (NB our hosted instance can't be used by anyone else as it's tied to our Slack token.)
Yep, we could: https://api.slack.com/methods/usergroups.list
It'd be mostly a copy/paste of how we handle channel names, meaning we'd inherit #5.
Example response:
{
"ok": true,
"usergroups": [
{
"id": "SAWPVDSUW",
"name": "Web Team",
"handle": "web-team"
}
]
}
id
is what we currently use in to_user_group_id
. handle
is what we'd want to expose in cc
. We could also support pinging specific users but I don't think that's necessary.
So our call sites would need to change from -d cc=web
to -d cc=web-team
. Or we could change the handles I guess, the suffix is redundant.
Suggested plan:
We support dynamically mapping channel names to IDs. Could we do the same for user and/or group mentions?: https://github.com/unsplash/mercury/blob/4b0b337d92fe435428e2c7bcd1504c4ede6acd28/src/slack/mention.rs#L6