0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-06-29 17:58:20 +02:00
dendrite/syncapi/routing
Umar Getagazov 8582c7520a
Omit state field from /messages response if empty (#2940)
The field type is `[ClientEvent]` in the
[spec](https://spec.matrix.org/v1.5/client-server-api/#get_matrixclientv3roomsroomidmessages),
but right now `null` can also be returned. Omit the field completely if
it's empty. Some clients (rightfully) assume it's either not present at
all or it's of the right type (see
https://github.com/matrix-org/matrix-react-sdk/pull/9913).

### Pull Request Checklist

<!-- Please read
https://matrix-org.github.io/dendrite/development/contributing before
submitting your pull request -->

* [x] I have added Go unit tests or [Complement integration
tests](https://github.com/matrix-org/complement) for this PR _or_ I have
justified why this PR doesn't need tests
    * The PR is a simple struct tag fix
* [x] Pull request includes a [sign off below using a legally
identifiable
name](https://matrix-org.github.io/dendrite/development/contributing#sign-off)
_or_ I have already signed off privately

Signed-off-by: `Umar Getagazov <umar@handlerug.me>`

Signed-off-by: Umar Getagazov <umar@handlerug.me>
2023-01-17 09:07:42 +01:00
..
context.go Don't limit "state" (#2849) 2022-11-02 09:34:19 +00:00
context_test.go Return state on calls to /message and lazy load members (#2218) 2022-03-01 14:39:56 +00:00
filter.go Do not use ioutil as it is deprecated (#2625) 2022-08-05 10:26:59 +01:00
getevent.go Move /event to the SyncAPI (#2782) 2022-10-10 12:19:16 +02:00
memberships.go return required room_id field in /members (#2846) 2022-11-01 16:42:07 +00:00
messages.go Omit state field from /messages response if empty (#2940) 2023-01-17 09:07:42 +01:00
relations.go Event relations (#2790) 2022-10-13 14:50:52 +01:00
routing.go Deny guest access on several endpoints (#2873) 2022-11-11 10:52:08 +01:00
search.go Don't limit "state" (#2849) 2022-11-02 09:34:19 +00:00