Notify clients when devices are deleted (#1233)

* Recheck device lists when join/leave events come in

* Add PerformDeviceDeletion

* Notify clients when devices are deleted

* Unbreak things

* Remove debug logging
This commit is contained in:
Kegsay 2020-07-30 18:00:56 +01:00 committed by GitHub
parent 292a9ddd82
commit a7e67e65a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 183 additions and 47 deletions

View file

@ -17,6 +17,7 @@ package userapi
import (
"github.com/gorilla/mux"
"github.com/matrix-org/dendrite/internal/config"
keyapi "github.com/matrix-org/dendrite/keyserver/api"
"github.com/matrix-org/dendrite/userapi/api"
"github.com/matrix-org/dendrite/userapi/internal"
"github.com/matrix-org/dendrite/userapi/inthttp"
@ -34,12 +35,13 @@ func AddInternalRoutes(router *mux.Router, intAPI api.UserInternalAPI) {
// NewInternalAPI returns a concerete implementation of the internal API. Callers
// can call functions directly on the returned API or via an HTTP interface using AddInternalRoutes.
func NewInternalAPI(accountDB accounts.Database, deviceDB devices.Database,
serverName gomatrixserverlib.ServerName, appServices []config.ApplicationService) api.UserInternalAPI {
serverName gomatrixserverlib.ServerName, appServices []config.ApplicationService, keyAPI keyapi.KeyInternalAPI) api.UserInternalAPI {
return &internal.UserInternalAPI{
AccountDB: accountDB,
DeviceDB: deviceDB,
ServerName: serverName,
AppServices: appServices,
KeyAPI: keyAPI,
}
}