Change the MSC3814 dehydrated device /events endpoint paging to match spec conventions#19897
Open
andybalaam wants to merge 9 commits into
Open
Conversation
da79173 to
641d479
Compare
641d479 to
0383801
Compare
0383801 to
faca7e1
Compare
richvdh
reviewed
Jul 1, 2026
Comment on lines
+434
to
+435
| if len(messages) > 0: | ||
| ret["next_batch"] = f"d{stream_id}" |
Member
There was a problem hiding this comment.
This means that the client will have to make an extra round-trip when it gets to the end of the pending messages, just to double-check that there are no more messages. Could we make get_messages_for_device return an additional boolean return value, indicating whether or not the result was "limited"?
Member
There was a problem hiding this comment.
I don't think that's valid in the type system!
Seems reasonable in principle though.
Member
Author
There was a problem hiding this comment.
Ouch, thank you. I've pushed fixes for this and a couple of other problems.
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
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.
To match the spec requirements for pagination:
/org.matrix.msc3814.v1/dehydrated_device/[device_id]/eventstofrom, andnext_batchfrom the response content if there are no more events to fetchThis matches the changes that are coming in MSC3814.
The previous change #19896 kept the old POST API to support old clients. This preserves that compatibility, so the POST API still works how it used to.
Depends on #19896
Part of element-hq/element-meta#2799
Pull Request Checklist