Add logic for determining when device lists have changed due to membership changes (#1220)

* Flesh out structure for handling device list updates for room membership changes

* First cut untested algorithm

* Add tests for determining changed/left device lists

* Linting

* Unbreak tests

* Sigh.. linting
This commit is contained in:
Kegsay 2020-07-27 09:19:55 +01:00 committed by GitHub
parent abef9bc04f
commit 61963a74ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 621 additions and 18 deletions

View file

@ -302,6 +302,10 @@ type Response struct {
ToDevice struct {
Events []gomatrixserverlib.SendToDeviceEvent `json:"events"`
} `json:"to_device"`
DeviceLists struct {
Changed []string `json:"changed,omitempty"`
Left []string `json:"left,omitempty"`
} `json:"device_lists,omitempty"`
}
// NewResponse creates an empty response with initialised maps.