It looks like the API to add and remove users from a group has changed too from the version in the Gem.
The gem makes a patch request to /admin/groups/group_id with
{
"changes": {
"add": [
"sam"
]
}
}
Discourse currently seems to expect a PUT to /admin/groups/group_id/members.json to add a user, and a DELETE to the same path to remove a user. However the DELETE call now seems to take the user_id as a param, not the username.
Again I am happy to fix. Shall we just change the gem to fit the current Discourse API? It means we only need to change the code in the gem. The drawback is that it is a little ugly to add users via username and remove via id in the interface.
allow either of these methods to take a username or a user_id as parameter.
Are you thinking this is by making an extra request to get the user_id or username as appropriate inside the group_add / group_remove methods, or by updating the API on the discourse side to allow either (and hence will need a PR against both repos)?