aboutsummaryrefslogtreecommitdiff
path: root/clientapi/routing/redaction.go
diff options
context:
space:
mode:
authorRyan W <twentybitdev@gmail.com>2021-09-08 17:31:03 +0100
committerGitHub <noreply@github.com>2021-09-08 17:31:03 +0100
commita624eab309ee6ee7b3540dfba884a42c9a4f4ad9 (patch)
tree92ec39ba2d0f512891dcb20635ee9bc660b45b18 /clientapi/routing/redaction.go
parent7dc8fb1fe780888d5758bf665949e9e09d21e56a (diff)
- Removed double imports (#1989)
- Lower cased error messages Signed-off-by: Ryan Whittington <twentybitdev@gmail.com> Co-authored-by: kegsay <kegan@matrix.org>
Diffstat (limited to 'clientapi/routing/redaction.go')
-rw-r--r--clientapi/routing/redaction.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/clientapi/routing/redaction.go b/clientapi/routing/redaction.go
index 92375974..c25ca4ef 100644
--- a/clientapi/routing/redaction.go
+++ b/clientapi/routing/redaction.go
@@ -22,7 +22,6 @@ import (
"github.com/matrix-org/dendrite/clientapi/httputil"
"github.com/matrix-org/dendrite/clientapi/jsonerror"
"github.com/matrix-org/dendrite/internal/eventutil"
- "github.com/matrix-org/dendrite/roomserver/api"
roomserverAPI "github.com/matrix-org/dendrite/roomserver/api"
"github.com/matrix-org/dendrite/setup/config"
userapi "github.com/matrix-org/dendrite/userapi/api"
@@ -113,7 +112,7 @@ func SendRedaction(
return jsonerror.InternalServerError()
}
- var queryRes api.QueryLatestEventsAndStateResponse
+ var queryRes roomserverAPI.QueryLatestEventsAndStateResponse
e, err := eventutil.QueryAndBuildEvent(req.Context(), &builder, cfg.Matrix, time.Now(), rsAPI, &queryRes)
if err == eventutil.ErrRoomNoExists {
return util.JSONResponse{
@@ -121,7 +120,7 @@ func SendRedaction(
JSON: jsonerror.NotFound("Room does not exist"),
}
}
- if err = roomserverAPI.SendEvents(context.Background(), rsAPI, api.KindNew, []*gomatrixserverlib.HeaderedEvent{e}, cfg.Matrix.ServerName, nil); err != nil {
+ if err = roomserverAPI.SendEvents(context.Background(), rsAPI, roomserverAPI.KindNew, []*gomatrixserverlib.HeaderedEvent{e}, cfg.Matrix.ServerName, nil); err != nil {
util.GetLogger(req.Context()).WithError(err).Errorf("failed to SendEvents")
return jsonerror.InternalServerError()
}