matrix-org / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://matrix-org.github.io/dendrite/
Apache License 2.0
5.67k stars 664 forks source link

Adding support for MSC3202 for E2E appservice support #3280

Open danpe opened 9 months ago

danpe commented 9 months ago

Looking at https://github.com/matrix-org/matrix-spec-proposals/pull/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.

S7evinK commented 9 months ago

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: