Rocket.Chat
Rocket.Chat copied to clipboard
Channel Moderators List REST API does no longer accept roomName
Description:
/api/v1/channels.moderators is no longer accepting listing moderators by roomName.
Calling the endpoint with only this returns {'error': "must have required property 'roomId' [invalid-params]", 'errorType': 'invalid-params', 'success': False}
Steps to reproduce:
- Do a call against the endpoint
curl -H "X-Auth-Token: yourToken"
-H "X-User-Id: yourUserID"
http://localhost:3000/api/v1/channels.moderators?roomName=General
Expected behavior:
Get the list of moderators for the GENERAL room
Actual behavior:
Returns an error asking for roomId
{'error': "must have required property 'roomId' [invalid-params]", 'errorType': 'invalid-params', 'success': False}
Server Setup Information:
- Version of Rocket.Chat Server: 4.8
- Operating System: linux
- Deployment Method: docker
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version:
- MongoDB Version: 4
Client Setup Information
- Desktop App or Browser Version:
- Operating System:
Additional context
Relevant logs:
@debdutdeb looks like you might have been the last one to touch this in https://github.com/RocketChat/Rocket.Chat/pull/25279 any ideas?
This is fixed in the latest develop.
I was trying to give it a try with rocketchat/rocket.chat:develop
but seems I can't use it the same way I use rocket.chat:latest
. The server seems to ignore MONGO_URL
and directly tries to connect to MongoDB on localhost. :confused:
The only situation I can see this happen is if the env variable was actually not passed to the container. Can you share the command[s] or compose file you're using?
This is the compose file I use for testing. I only replaced the image. https://github.com/jadolg/rocketchat_API/blob/master/docker-compose-test-server.yml
@debdutdeb is there any schedule I can follow for when this fix will be released in latest
?
I have a couple of PRs I'd like to merge and I would like to avoid skipping the failing test.
@geekgonecrazy @debdutdeb are this changes already life in latest
? I was not able to test against your develop
branch.
Yes this should now be fixed in the latest release.
Ah no wait i might be confusing with another similar bug. Give me an hour; in the store. I thought this was covered in the PR.
Hey @jadolg thanks for waiting. I just checked, it is indeed working on latest develop so I didn't confuse.
I won't close the issue just yet; can you check one more time please?
You can also check against our open server;
Thank you so much for checking. I still cannot run my tests against your develop
image. I guess I'll wait until it gets merged and eventually lands on this image which I use for testing every week.
Do you know approximately when these changes are being released?
Do you have any quick docker-compose setup I can use (like the one here https://github.com/jadolg/rocketchat_API/blob/master/docker-compose-test-server.yml) but for the images your produce in https://hub.docker.com/r/rocketchat/rocket.chat ?
edit: I also tried with registry.rocket.chat/rocketchat/rocket.chat:develop
and I get the same result. It seems to ignore MONGO_URL
and tries to connect to localhost.
Well, the problem seems to be gone in the latest version.