mirror of
https://github.com/matrix-org/dendrite.git
synced 2024-11-23 14:51:56 -06:00
Fix build
This commit is contained in:
parent
019f0922ea
commit
f1e8d19cea
|
@ -29,7 +29,6 @@ import (
|
||||||
"github.com/matrix-org/dendrite/roomserver/api"
|
"github.com/matrix-org/dendrite/roomserver/api"
|
||||||
"github.com/matrix-org/dendrite/setup/config"
|
"github.com/matrix-org/dendrite/setup/config"
|
||||||
userapi "github.com/matrix-org/dendrite/userapi/api"
|
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/gomatrixserverlib"
|
||||||
"github.com/matrix-org/util"
|
"github.com/matrix-org/util"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
@ -129,7 +128,6 @@ func sendServerNoticeForConsent(userAPI userapi.UserInternalAPI, rsAPI api.Rooms
|
||||||
cfgNotices *config.ServerNotices,
|
cfgNotices *config.ServerNotices,
|
||||||
cfgClient *config.ClientAPI,
|
cfgClient *config.ClientAPI,
|
||||||
senderDevice *userapi.Device,
|
senderDevice *userapi.Device,
|
||||||
accountsDB userdb.Database,
|
|
||||||
asAPI appserviceAPI.AppServiceQueryAPI,
|
asAPI appserviceAPI.AppServiceQueryAPI,
|
||||||
) {
|
) {
|
||||||
res := &userapi.QueryOutdatedPolicyResponse{}
|
res := &userapi.QueryOutdatedPolicyResponse{}
|
||||||
|
@ -180,7 +178,7 @@ func sendServerNoticeForConsent(userAPI userapi.UserInternalAPI, rsAPI api.Rooms
|
||||||
Body: msgBody.String(),
|
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 {
|
if err != nil {
|
||||||
logrus.WithError(err).WithField("userID", userID).Error("failed to send server notice for consent to user")
|
logrus.WithError(err).WithField("userID", userID).Error("failed to send server notice for consent to user")
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -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")
|
logrus.Warnf("Consent tracking is enabled, but server notes are not. No server notice will be sent to users")
|
||||||
} else {
|
} else {
|
||||||
// start a new go routine to send messages about consent
|
// 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",
|
publicAPIMux.Handle("/consent",
|
||||||
httputil.MakeHTMLAPI("consent", func(writer http.ResponseWriter, request *http.Request) *util.JSONResponse {
|
httputil.MakeHTMLAPI("consent", func(writer http.ResponseWriter, request *http.Request) *util.JSONResponse {
|
||||||
|
|
Loading…
Reference in a new issue