Skip to content
This repository was archived by the owner on Nov 25, 2024. It is now read-only.

Add support for server query param in publicrooms #942

Closed
wants to merge 5 commits into from

Conversation

prateek2211
Copy link
Contributor

Signed-off-by: Prateek Sachan psachan@cs.iitr.ac.in

Fixes part1 #638

Pull Request Checklist

  • I have added any new tests that need to pass to testfile as specified in docs/sytest.md
  • Pull request includes a sign off

@anoadragon453 anoadragon453 requested a review from a team March 27, 2020 15:14
Copy link
Contributor

@Cnly Cnly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the test Can get remote public room list should pass now but it doesn't. Any idea?

@prateek2211
Copy link
Contributor Author

@kegsay I'm not able to figure out why the test Can get remote public room list is failing.
I have tried to pass server param on local machine, everything seems to work fine there.

Need a bit of help here.

@kegsay
Copy link
Member

kegsay commented Apr 3, 2020

12 bytes seems a bit small for a response with a room.

time="2020-04-01T17:57:19.090099173Z" level=info msg="Incoming request" func=github.com/matrix-org/util.RequestWithLogging file="/gopath/pkg/mod/github.com/matrix-org/util@v0.0.0-20190711121626-527ce5ddefc7/json.go:122" req.id=fxwNkV64MToL req.method=GET req.path=/_matrix/client/r0/publicRooms
time="2020-04-01T17:57:19.090597907Z" level=info msg="Outgoing request" func="github.com/matrix-org/gomatrixserverlib.(*Client).DoHTTPRequest" file="/gopath/pkg/mod/github.com/matrix-org/gomatrixserverlib@v0.0.0-20200327155501-33fb4c7049dc/client.go:379" out.req.ID=FVCO0QWHKTxD out.req.method=GET out.req.uri="matrix://localhost:8800/_matrix/federation/v1/publicRooms?include_all_networks=false&limit=0&since=&third_party_instance_id=" req.id=fxwNkV64MToL req.method=GET req.path=/_matrix/client/r0/publicRooms
time="2020-04-01T17:57:19.110408428Z" level=info msg="Outgoing request returned" func="github.com/matrix-org/gomatrixserverlib.(*Client).DoHTTPRequest" file="/gopath/pkg/mod/github.com/matrix-org/gomatrixserverlib@v0.0.0-20200327155501-33fb4c7049dc/client.go:393" out.req.ID=FVCO0QWHKTxD out.req.code=200 out.req.duration_ms=19 out.req.method=GET out.req.uri="matrix://localhost:8800/_matrix/federation/v1/publicRooms?include_all_networks=false&limit=0&since=&third_party_instance_id=" req.id=fxwNkV64MToL req.method=GET req.path=/_matrix/client/r0/publicRooms
time="2020-04-01T17:57:19.110618280Z" level=info msg="Responding (12 bytes)" func=github.com/matrix-org/util.respond file="/gopath/pkg/mod/github.com/matrix-org/util@v0.0.0-20190711121626-527ce5ddefc7/json.go:170" code=200 req.id=fxwNkV64MToL req.method=GET req.path=/_matrix/client/r0/publicRooms

So it seems like the remote queried server isn't returning the rooms.

@kegsay
Copy link
Member

kegsay commented Apr 3, 2020

The test tries to make a published room by performing:

matrix_create_room( $local_user,
         visibility      => "public",
         name            => "Test Name",
         topic           => "Test Topic",
      )

So I imagine visibility: public is not setting the published flag because it isn't implemented in Dendrite yet. https://matrix.org/docs/spec/client_server/r0.6.0#post-matrix-client-r0-createroom

@prateek2211
Copy link
Contributor Author

prateek2211 commented Apr 3, 2020

Oh, I get it. I manually edited the visibility column in table while testing
so, createRoom is currently ignoring the visibility field in the request.
I would like to add visibility check in public room creation.
Is there a corresponding issue?

@Cnly
Copy link
Contributor

Cnly commented Apr 4, 2020

Took a quick look and it's probably #603.

@neilalexander
Copy link
Contributor

The public rooms API has been replaced as of #1174, #1176.

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

Successfully merging this pull request may close these issues.

4 participants