Fix crash

This commit is contained in:
Neil Alexander 2021-12-09 10:24:51 +00:00
parent 645e3f5833
commit 1c117cf768
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 9 additions and 0 deletions

View file

@ -58,12 +58,20 @@ func NewRoomserverAPI(
PerspectiveServerNames: perspectiveServerNames,
ACLs: serverACLs,
Producer: producer,
OutputRoomEventTopic: outputRoomEventTopic,
Queryer: &query.Queryer{
DB: roomserverDB,
Cache: caches,
ServerName: cfg.Matrix.ServerName,
ServerACLs: serverACLs,
},
Inputer: &input.Inputer{
DB: roomserverDB,
OutputRoomEventTopic: outputRoomEventTopic,
Producer: producer,
ServerName: cfg.Matrix.ServerName,
ACLs: serverACLs,
},
// perform-er structs get initialised when we have a federation sender to use
}
return a

View file

@ -102,6 +102,7 @@ func (r *Inputer) processRoomEvent(
// First of all, check that the auth events of the event are known.
// If they aren't then we will ask the federation API for them.
if err := r.checkForMissingAuthEvents(ctx, input); err != nil {
logrus.WithError(err).Error("XXX: r.checkForMissingAuthEvents")
return "", fmt.Errorf("r.checkForMissingAuthEvents: %w", err)
}