* Fix sync example
The same event should not appear in `state` and in the `timeline` so we cannot use the same event twice.
To provide a `state` example we assume that with lazy-loading the user did not get the state event for `@example:example.org`, so we add one since they sent a message in the timeline.
The events that are referenced include a `room_id`, which doesn't appear on this endpoint, so we copy them without it.
Finally, the `join` event of `@alice:example.org` is wrong because the sender does not match the state key, which wouldn't pass the authorization rules.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Fix the `m.room.member.yaml` example
This is a `join` event, and the `sender` doesn't match the `state_key`, so the event couldn't pass the authorization rules.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Add changelog
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
---------
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* MSC4260: Reporting users (Client-Server API)
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
* Add changelog
* Update data/api/client-server/report_content.yaml
Co-authored-by: Kévin Commaille <76261501+zecakeh@users.noreply.github.com>
* Move option to consistently respond with 200 to user reporting endpoint
* Move optional random delay to event and user reporting endpoints
* Make reason required for user and room reports
* Fix requiredness syntax
---------
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
Co-authored-by: Kévin Commaille <76261501+zecakeh@users.noreply.github.com>
We used to only look for examples in a few (sometimes arbitrary) places, and we didn't support showing several examples in most cases. This is intended to fix this. In the process we try to deduplicate code to make sure that we use the same logic everywhere.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
First of all, all PDU definitions were based on the v1 PDU definition with a few fields overwritten to change the format with needed.
While that works when rendering the spec, this is semantically incorrect because it means that the objects must match both schemas, which is impossible.
So now we make a base with only the common fields, and we add the others as needed by the room version.
Note that there is no more "unsigned PDU" definition since it is not used directly, and hashes and signatures are the same across all versions.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Remove the `origin` field on PUT /send_join responses
This is a spec bug as it has actually never been sent by Synapse, going back to 2014.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Add changelog
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
---------
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Add error codes from MSC4178
* changelog
* Put changelog in the right place
* Move newsfile
* Add the codes to the right endpoint
* Also add M_THREEPID_IN_USE
which was always used and is specified in the IS API, but not in the
C/S API. We decided this was well-specced enough that it didn't need
its own MSC.
While 1405184765 redefined most fields to
be the appropriate object type, it missed one of them.
Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>
The `<>` delimiters are not necessary for the shortcode to be rendered inline, and in some cases they break some expectations: a shortcode that is separated from other text to be in its own paragraph is not actually wrapped by a `p` element, breaking the spacing between paragraphs.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
I did a quick search of the "deprecated" word in the data folder and set the
field where the description says that a property is deprecated.
This does not change the rendering of the spec because the
descriptions already talk about the deprecation,
but it can be used by tools that rely on the OpenAPI definitions and JSON Schemas.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>