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

Fix issues around /roomId/messages #1309

Closed
kegsay opened this issue Aug 24, 2020 · 4 comments
Closed

Fix issues around /roomId/messages #1309

kegsay opened this issue Aug 24, 2020 · 4 comments
Assignees
Labels
are-we-synapse-yet This issue or PR involves Sytests in AWSY good first issue Want to help with Dendrite? These are the issues to start with!

Comments

@kegsay
Copy link
Member

kegsay commented Aug 24, 2020

Sytests:

    × Local room members can get room messages
    × Remote room members can get room messages
    × Can get rooms/{roomId}/messages for a departed room (SPEC-216)
@kegsay kegsay added good first issue Want to help with Dendrite? These are the issues to start with! are-we-synapse-yet This issue or PR involves Sytests in AWSY labels Aug 24, 2020
@alexkursell
Copy link
Contributor

I looked into these two tests:

 × Local room members can get room messages
 × Remote room members can get room messages

They are failing because they expect the message events to contain a user_id field, which synapse does but which is not in the spec. I have no idea why synapse includes it either. It's always a copy of the sender field.

I guess the options here are either to modify the tests to check for sender instead, add the redundant field to dendrite or just ignore those tests.

@torabshaikh
Copy link

Hi @kegsay I want to start contributing to the project and this looks like a good issue to start that. Can you please guide me on this?

@MadLittleMods
Copy link
Contributor

MadLittleMods commented Dec 18, 2020

They are failing because they expect the message events to contain a user_id field, which synapse does but which is not in the spec. I have no idea why synapse includes it either. It's always a copy of the sender field.

@alexkursell I think it would be best to edit the test.

The user_id is part of the v1 old style of events. Currently, Synapse emits v1 properties merged into the v2 spec for compatibility but there are plans to remove them soon™, matrix-org/synapse#6452

sender is the property to use instead.

Also discussed at https://gitlab.com/gitterHQ/webapp/-/merge_requests/2040#note_438956625 which is how I am aware.

@kegsay
Copy link
Member Author

kegsay commented Dec 21, 2020

Fab, thanks for looking into this @alexkursell - I've made a PR on Sytest to fix this and a few other places where we were doing the same thing.

@torabshaikh - it looks like this issue was with the tests and not Dendrite, so I've resolved this upstream.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
are-we-synapse-yet This issue or PR involves Sytests in AWSY good first issue Want to help with Dendrite? These are the issues to start with!
Projects
None yet
Development

No branches or pull requests

4 participants