mirror of
https://github.com/matrix-org/dendrite
synced 2024-10-31 21:19:04 +01:00
Merge branch 'kegan/redact-txn' into matthew/peeking
This commit is contained in:
commit
ed4b3a58a7
1 changed files with 11 additions and 2 deletions
|
@ -543,7 +543,13 @@ func (d *Database) GetFilter(
|
||||||
func (d *Database) PutFilter(
|
func (d *Database) PutFilter(
|
||||||
ctx context.Context, localpart string, filter *gomatrixserverlib.Filter,
|
ctx context.Context, localpart string, filter *gomatrixserverlib.Filter,
|
||||||
) (string, error) {
|
) (string, error) {
|
||||||
return d.Filter.InsertFilter(ctx, filter, localpart)
|
var filterID string
|
||||||
|
var err error
|
||||||
|
err = d.Writer.Do(nil, nil, func(txn *sql.Tx) error {
|
||||||
|
filterID, err = d.Filter.InsertFilter(ctx, filter, localpart)
|
||||||
|
return err
|
||||||
|
})
|
||||||
|
return filterID, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Database) IncrementalSync(
|
func (d *Database) IncrementalSync(
|
||||||
|
@ -607,7 +613,10 @@ func (d *Database) RedactEvent(ctx context.Context, redactedEventID string, reda
|
||||||
}
|
}
|
||||||
|
|
||||||
newEvent := ev.Headered(redactedBecause.RoomVersion)
|
newEvent := ev.Headered(redactedBecause.RoomVersion)
|
||||||
|
err = d.Writer.Do(nil, nil, func(txn *sql.Tx) error {
|
||||||
return d.OutputEvents.UpdateEventJSON(ctx, &newEvent)
|
return d.OutputEvents.UpdateEventJSON(ctx, &newEvent)
|
||||||
|
})
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// getResponseWithPDUsForCompleteSync creates a response and adds all PDUs needed
|
// getResponseWithPDUsForCompleteSync creates a response and adds all PDUs needed
|
||||||
|
|
Loading…
Reference in a new issue