Open danpe opened 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:
m.room.encrypted
eventappserviceState
keep track of the StreamPosition
(from, in this case) to be able to calculate device_lists
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.