-
Notifications
You must be signed in to change notification settings - Fork 399
MSC3715: Add a pagination direction parameter to /relations
#3715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
8fd9ac3
afb882b
17cc780
f7f92a1
08f85e3
b3007ce
d80dad9
b343651
6f4a77c
53590c3
703ccc1
5620bb1
defb0dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# MSC3715: `/relations` partiy with `/messages` | ||
|
||
[MSC2675](https://github.com/matrix-org/matrix-doc/pull/2675) introduced the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm unsure it is worth including in this MSC (I don't think it is), but older versions of MSC2675 did include a I can include more context here in the MSC if necessary, but I think letting this MSC stand on its own is probably better. |
||
`/relations` API as an endpoint to paginate over the relations of an event. It | ||
is described as behaving like the `/messages` API, but is missing parameters | ||
to fully achieve that. | ||
|
||
|
||
## Proposal | ||
clokep marked this conversation as resolved.
Show resolved
Hide resolved
clokep marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Two new parameters be added to the `/relations` API for parity with `/messages`, | ||
both [parameters have the same as definition as for `/messages`](https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3roomsroomidmessages), | ||
which are copied below: | ||
|
||
* `dir`: The direction to return events from. If this is set to `f`, events will | ||
be returned in chronological order starting at `from`. If it is set to `b`, | ||
events will be returned in *reverse* chronological order, again starting at `from`. | ||
|
||
One of: `[b f]`. | ||
* `filter`: A JSON RoomEventFilter to filter returned events with. | ||
|
||
The rationale for both of these is parity between endpoints, which makes the | ||
overall specification easier to reason about. Additionally, these parameters | ||
make it easier to request missing relation information without needed to paginate | ||
through known information -- this is particularly needed for mobile or | ||
low-bandwidth devices where it is desired to keep the round-trips to the server | ||
to a minimum. | ||
|
||
|
||
## Potential issues | ||
|
||
The `dir` parameter needs to be optional (defaulting to `b`) to be backwards | ||
compatible with MSC2675 (and Synapse's legacy implementation). | ||
|
||
|
||
## Alternatives | ||
|
||
None. | ||
clokep marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
## Security considerations | ||
|
||
None. | ||
|
||
## Unstable prefix | ||
|
||
None, assuming that this lands in the same Matrix specification version as MSC2675. |
Uh oh!
There was an error while loading. Please reload this page.