Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Channel Moderators List REST API does no longer accept roomName #26262

Closed
jadolg opened this issue Jul 14, 2022 · 13 comments
Closed

Channel Moderators List REST API does no longer accept roomName #26262

jadolg opened this issue Jul 14, 2022 · 13 comments

Comments

@jadolg
Copy link

jadolg commented Jul 14, 2022

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:

  1. 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:

@geekgonecrazy geekgonecrazy changed the title Channel Moderators List REAST API does no longer accept roomName Channel Moderators List REST API does no longer accept roomName Jul 14, 2022
@geekgonecrazy
Copy link
Contributor

@debdutdeb looks like you might have been the last one to touch this in #25279 any ideas?

@debdutdeb
Copy link
Member

This is fixed in the latest develop.

@jadolg
Copy link
Author

jadolg commented Jul 16, 2022

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. 😕

@debdutdeb
Copy link
Member

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?

@jadolg
Copy link
Author

jadolg commented Jul 16, 2022

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

@jadolg
Copy link
Author

jadolg commented Jul 25, 2022

@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.

@jadolg
Copy link
Author

jadolg commented Aug 7, 2022

@geekgonecrazy @debdutdeb are this changes already life in latest? I was not able to test against your develop branch.

@debdutdeb
Copy link
Member

Yes this should now be fixed in the latest release.

@debdutdeb
Copy link
Member

debdutdeb commented Aug 7, 2022

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.

@debdutdeb
Copy link
Member

Hey @jadolg thanks for waiting. I just checked, it is indeed working on latest develop so I didn't confuse.
Screenshot 2022-08-07 at 3 58 47 PM
I won't close the issue just yet; can you check one more time please?

@debdutdeb
Copy link
Member

You can also check against our open server;
Screenshot 2022-08-07 at 4 03 16 PM

@jadolg
Copy link
Author

jadolg commented Aug 7, 2022

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.

@jadolg
Copy link
Author

jadolg commented Aug 30, 2022

Well, the problem seems to be gone in the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants