From 1c117cf7684541e35cc7215f5eff5e59bf206811 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 9 Dec 2021 10:24:51 +0000 Subject: [PATCH] Fix crash --- roomserver/internal/api.go | 8 ++++++++ roomserver/internal/input/input_events.go | 1 + 2 files changed, 9 insertions(+) diff --git a/roomserver/internal/api.go b/roomserver/internal/api.go index 0a7f3291..52294aa8 100644 --- a/roomserver/internal/api.go +++ b/roomserver/internal/api.go @@ -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 diff --git a/roomserver/internal/input/input_events.go b/roomserver/internal/input/input_events.go index b647a86d..7b8c7bd1 100644 --- a/roomserver/internal/input/input_events.go +++ b/roomserver/internal/input/input_events.go @@ -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) }