aboutsummaryrefslogtreecommitdiff
path: root/clientapi/routing
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2023-09-27 08:27:08 +0200
committerGitHub <noreply@github.com>2023-09-27 08:27:08 +0200
commit05a8f1ede3ca0ccd0f9a7d327ef3cb30b6fd2798 (patch)
treecda98010f6bf78dd4a595d5132dcf5186c20a99f /clientapi/routing
parent16d922de701ca28966127b2e1160d65527f65e8e (diff)
Support for room version v11 (#3204)
Fixes #3203
Diffstat (limited to 'clientapi/routing')
-rw-r--r--clientapi/routing/redaction.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/clientapi/routing/redaction.go b/clientapi/routing/redaction.go
index aa579db6..f331a73c 100644
--- a/clientapi/routing/redaction.go
+++ b/clientapi/routing/redaction.go
@@ -34,7 +34,8 @@ import (
)
type redactionContent struct {
- Reason string `json:"reason"`
+ Reason string `json:"reason"`
+ Redacts string `json:"redacts"`
}
type redactionResponse struct {
@@ -151,6 +152,11 @@ func SendRedaction(
Type: spec.MRoomRedaction,
Redacts: eventID,
}
+
+ // Room version 11 expects the "redacts" field on the
+ // content field, so add it here as well
+ r.Redacts = eventID
+
err = proto.SetContent(r)
if err != nil {
util.GetLogger(req.Context()).WithError(err).Error("proto.SetContent failed")