aboutsummaryrefslogtreecommitdiff
path: root/internal/eventutil/events.go
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-07-08 17:45:39 +0100
committerGitHub <noreply@github.com>2020-07-08 17:45:39 +0100
commitd9648b0615f3a7b1d8a824777783f19fa46697f4 (patch)
treeef31525f671b96e8e765fbb3cd3f325d8a9ee8a7 /internal/eventutil/events.go
parenta5a51b41416e9b1d8084dbc759dff735133817fa (diff)
Finish implementing redactions (#1189)
* Add a bit more logging to the fedsender * bugfix: continue sending PDUs if ones are added whilst sending another PDU Without this, the queue goes back to sleep on `<-oq.notifyPDUs` which won't fire because `pendingPDUs` is already > 0. This should fix a flakey sytest. * Break if no txn is sent * WIP syncapi work * More debugging * Bump GMSL version to pull in working Event.Redact * Remove logging * Make redactions work on v3+ * Fix more tests
Diffstat (limited to 'internal/eventutil/events.go')
-rw-r--r--internal/eventutil/events.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/eventutil/events.go b/internal/eventutil/events.go
index e3b8f3d3..1e3afac8 100644
--- a/internal/eventutil/events.go
+++ b/internal/eventutil/events.go
@@ -162,5 +162,10 @@ func RedactEvent(redactionEvent, redactedEvent *gomatrixserverlib.Event) (*gomat
if err != nil {
return nil, err
}
+ // NOTSPEC: sytest relies on this unspecced field existing :(
+ err = r.SetUnsignedField("redacted_by", redactionEvent.EventID())
+ if err != nil {
+ return nil, err
+ }
return &r, nil
}