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

Adding support for MSC3202 for E2E appservice support #3280

Open
matrixbot opened this issue Nov 1, 2024 · 1 comment
Open

Adding support for MSC3202 for E2E appservice support #3280

matrixbot opened this issue Nov 1, 2024 · 1 comment

Comments

@matrixbot
Copy link
Collaborator

This issue was originally created by @danpe at matrix-org/dendrite#3280.

Looking at matrix-org/matrix-spec-proposals#3202 seems like a pretty straight forward implementation.
I think I can contribute that part, but would love for direction on which files it should be implemented on.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @S7evinK at matrix-org/dendrite#3280 (comment).

Ignoring MSC2409, we need device_lists, device_one_time_keys_count and device_unused_fallback_key_types (the latter isn't implemented yet, iirc)
device_lists and device_one_time_keys_count currently have some internal functions in the SyncAPI:

https://github.com/matrix-org/dendrite/blob/d65449c7822e89b506bf2caa7a098e38970f6f27/syncapi/internal/keychange.go#L36
https://github.com/matrix-org/dendrite/blob/d65449c7822e89b506bf2caa7a098e38970f6f27/syncapi/internal/keychange.go#L52-L55

Those are used for /sync responses and most likely will need to be "public" so the appservice API can use them.
So IMO, we need to modify https://github.com/matrix-org/dendrite/blob/main/appservice/consumers/roomserver.go to:

  • Add OTKs for all users the appservice is interested in when the consumer receives a m.room.encrypted event
  • Have appserviceState keep track of the StreamPosition (from, in this case) to be able to calculate device_lists
  • Make the mentioned internal functions public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant