This commit is contained in:
Kegan Dougal 2020-07-07 12:09:13 +01:00
parent 7f78bdd2ac
commit 007afcae60
2 changed files with 6 additions and 5 deletions

View file

@ -32,6 +32,8 @@ import (
// TODO(#375): This should be rewritten to allow concurrent calls. The
// difficulty is in ensuring that we correctly annotate events with the correct
// state deltas when sending to kafka streams
// TODO: Break up function - we should probably do transaction ID checks before calling this.
// nolint:gocyclo
func (r *RoomserverInternalAPI) processRoomEvent(
ctx context.Context,
input api.InputRoomEvent,
@ -67,9 +69,9 @@ func (r *RoomserverInternalAPI) processRoomEvent(
}
// if storing this event results in it being redacted then do so.
if redactedEventID == event.EventID() {
r, err := eventutil.RedactEvent(redactionEvent, &event)
if err != nil {
return "", err
r, rerr := eventutil.RedactEvent(redactionEvent, &event)
if rerr != nil {
return "", rerr
}
event = *r
}

View file

@ -18,8 +18,7 @@ import (
)
const (
testOrigin = gomatrixserverlib.ServerName("kaer.morhen")
testDestination = gomatrixserverlib.ServerName("white.orchard")
testOrigin = gomatrixserverlib.ServerName("kaer.morhen")
// we have to use an on-disk DB because we open multiple connections due to the *Updater structs.
// Using :memory: results in a brand new DB for each open connection, and sharing memory via
// ?cache=shared just allows read-only sharing, so writes to the database on other connections are lost.