diff --git a/clientapi/routing/consent_tracking.go b/clientapi/routing/consent_tracking.go index 92a31a41a..f61c8d997 100644 --- a/clientapi/routing/consent_tracking.go +++ b/clientapi/routing/consent_tracking.go @@ -29,7 +29,6 @@ import ( "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/setup/config" userapi "github.com/matrix-org/dendrite/userapi/api" - userdb "github.com/matrix-org/dendrite/userapi/storage" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" "github.com/sirupsen/logrus" @@ -129,7 +128,6 @@ func sendServerNoticeForConsent(userAPI userapi.UserInternalAPI, rsAPI api.Rooms cfgNotices *config.ServerNotices, cfgClient *config.ClientAPI, senderDevice *userapi.Device, - accountsDB userdb.Database, asAPI appserviceAPI.AppServiceQueryAPI, ) { res := &userapi.QueryOutdatedPolicyResponse{} @@ -180,7 +178,7 @@ func sendServerNoticeForConsent(userAPI userapi.UserInternalAPI, rsAPI api.Rooms Body: msgBody.String(), }, } - _, err = sendServerNotice(context.Background(), req, rsAPI, cfgNotices, cfgClient, senderDevice, accountsDB, asAPI, userAPI, nil, nil, nil) + _, err = sendServerNotice(context.Background(), req, rsAPI, cfgNotices, cfgClient, senderDevice, asAPI, userAPI, nil, nil, nil) if err != nil { logrus.WithError(err).WithField("userID", userID).Error("failed to send server notice for consent to user") continue diff --git a/clientapi/routing/routing.go b/clientapi/routing/routing.go index ddf540069..bac4379a7 100644 --- a/clientapi/routing/routing.go +++ b/clientapi/routing/routing.go @@ -178,7 +178,7 @@ func Setup( logrus.Warnf("Consent tracking is enabled, but server notes are not. No server notice will be sent to users") } else { // start a new go routine to send messages about consent - go sendServerNoticeForConsent(userAPI, rsAPI, &cfg.Matrix.ServerNotices, cfg, serverNotificationSender, accountDB, asAPI) + go sendServerNoticeForConsent(userAPI, rsAPI, &cfg.Matrix.ServerNotices, cfg, serverNotificationSender, asAPI) } publicAPIMux.Handle("/consent", httputil.MakeHTMLAPI("consent", func(writer http.ResponseWriter, request *http.Request) *util.JSONResponse {