diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2023-09-27 08:27:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-27 08:27:08 +0200 |
commit | 05a8f1ede3ca0ccd0f9a7d327ef3cb30b6fd2798 (patch) | |
tree | cda98010f6bf78dd4a595d5132dcf5186c20a99f /clientapi/routing | |
parent | 16d922de701ca28966127b2e1160d65527f65e8e (diff) |
Support for room version v11 (#3204)
Fixes #3203
Diffstat (limited to 'clientapi/routing')
-rw-r--r-- | clientapi/routing/redaction.go | 8 |
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") |