Conversation
…room_ids Tests for Synapse regression fix: matrix-org/synapse#12683 Issue: matrix-org/synapse#12678
MadLittleMods
commented
May 10, 2022
| } | ||
|
|
||
| // With a non-existent room_id, GET /rooms/:room_id/messages returns 403 | ||
| // forbidden ("You aren't a member of the room"). |
Collaborator
Author
There was a problem hiding this comment.
As described in the spec,
403 | You aren’t a member of the room.
-- https://spec.matrix.org/latest/client-server-api/#get_matrixclientv3roomsroomidmessages
5 tasks
MadLittleMods
commented
May 10, 2022
MadLittleMods
added a commit
to matrix-org/synapse
that referenced
this pull request
May 11, 2022
…12683) Fix #12678 Complement test added: matrix-org/complement#369 **Before:** 500 internal server error **After:** According to the [spec](https://spec.matrix.org/latest/client-server-api/#get_matrixclientv3roomsroomidmessages), calling `/messages` against a non-existent `room_id` should throw a 403 forbidden (since you're not part of the room). This also matches the behavior before #12370 which regressed Synapse to the 500 behavior. ```json { "errcode": "M_FORBIDDEN", "error": "User @test:my.synapse.server not in room !dne:my.synapse.server, and room previews are disabled" } ```
kegsay
added a commit
to matrix-org/dendrite
that referenced
this pull request
May 11, 2022
kegsay
added a commit
to matrix-org/dendrite
that referenced
this pull request
May 11, 2022
Member
|
Silly github auto-closed the PR when I merged the Dendrite fix :S |
…does-not-exist-room-id
kegsay
approved these changes
May 11, 2022
Collaborator
Author
|
Thanks for the review and merge @kegsay! Cool to see the Dendrite fix for this to all align as well! 🦏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add test to make sure
/messagesbehaves as expected for non-existentroom_id'sTests for Synapse regression fix: matrix-org/synapse#12683
Issue: matrix-org/synapse#12678