Skip to content
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

Make to-device message sending ordered #966

Open
ara4n opened this issue Jan 7, 2022 · 3 comments
Open

Make to-device message sending ordered #966

ara4n opened this issue Jan 7, 2022 · 3 comments
Labels
improvement An idea/future MSC for the spec

Comments

@ara4n
Copy link
Member

ara4n commented Jan 7, 2022

This is problematic if you use them for something like matrix-org/matrix-spec-proposals#3401, where it's valid to send a cluster of to-device events at the same time, but causality should be preserved (otherwise you'll receive candidates before invites, etc).

@uhoreg
Copy link
Member

uhoreg commented Jan 19, 2022

https://spec.matrix.org/unstable/client-server-api/#server-behaviour-4 says

... the server should list the pending messages, in order of arrival, in the response body.

So it seems like if you're receiving messages out of order, it's a server issue.

@richvdh richvdh transferred this issue from matrix-org/matrix-spec-proposals Mar 2, 2022
@turt2live
Copy link
Member

while the receipt of to-device events is ordered, the sending isn't necessarily guaranteed over federation

@turt2live turt2live added improvement An idea/future MSC for the spec and removed spec-bug Something which is in the spec, but is wrong labels May 28, 2022
@turt2live turt2live changed the title To-device messages have no ordering Make to-device message sending ordered May 28, 2022
@richvdh
Copy link
Member

richvdh commented Jul 6, 2023

while the receipt of to-device events is ordered, the sending isn't necessarily guaranteed over federation

honestly I kinda thought to-device delivery was ordered over federation in practice (although the spec doesn't say so explicitly).

Significant reordering could cause decryption problems (cf element-hq/element-web#25723), so if not, it's a thing we should fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement An idea/future MSC for the spec
Projects
None yet
Development

No branches or pull requests

4 participants