Fix syncAPI redactions (#3118)

Previously we were setting `redacted_because` to the PDU event, but as
per the spec it should really be a client event.
This fixes it.
This commit is contained in:
Till 2023-06-28 10:05:00 +02:00 committed by GitHub
parent 45082d4dce
commit a5ea928d0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 67 additions and 6 deletions

View file

@ -174,7 +174,7 @@ type Database interface {
// goes wrong.
PutFilter(ctx context.Context, localpart string, filter *synctypes.Filter) (string, error)
// RedactEvent wipes an event in the database and sets the unsigned.redacted_because key to the redaction event
RedactEvent(ctx context.Context, redactedEventID string, redactedBecause *rstypes.HeaderedEvent) error
RedactEvent(ctx context.Context, redactedEventID string, redactedBecause *rstypes.HeaderedEvent, querier api.QuerySenderIDAPI) error
// StoreReceipt stores new receipt events
StoreReceipt(ctx context.Context, roomId, receiptType, userId, eventId string, timestamp spec.Timestamp) (pos types.StreamPosition, err error)
UpdateIgnoresForUser(ctx context.Context, userID string, ignores *types.IgnoredUsers) error