diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-09-02 15:26:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-02 15:26:30 +0100 |
commit | 096191ca240776031370e99b93732557972ba92a (patch) | |
tree | 79f4247556a3dbd01fc8dca2fac68f752800a6d7 /roomserver/internal/api.go | |
parent | e473320e733484b1cc6da0588fd2ccf4affb3d24 (diff) |
Use federation sender for backfill/getting missing events (#1379)
* Use federation sender for backfill and getting missing events
* Fix internal URL paths
* Update go.mod/go.sum for matrix-org/gomatrixserverlib#218
* Add missing server implementations in HTTP interface
Diffstat (limited to 'roomserver/internal/api.go')
-rw-r--r-- | roomserver/internal/api.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/roomserver/internal/api.go b/roomserver/internal/api.go index 1897f7a5..8ac1bdda 100644 --- a/roomserver/internal/api.go +++ b/roomserver/internal/api.go @@ -22,7 +22,7 @@ type RoomserverInternalAPI struct { Cache caching.RoomServerCaches ServerName gomatrixserverlib.ServerName KeyRing gomatrixserverlib.JSONVerifier - FedClient *gomatrixserverlib.FederationClient + fsAPI fsAPI.FederationSenderInternalAPI OutputRoomEventTopic string // Kafka topic for new output room events Inviter *perform.Inviter Joiner *perform.Joiner @@ -30,12 +30,11 @@ type RoomserverInternalAPI struct { Publisher *perform.Publisher Backfiller *perform.Backfiller mutexes sync.Map // room ID -> *sync.Mutex, protects calls to processRoomEvent - fsAPI fsAPI.FederationSenderInternalAPI } func NewRoomserverAPI( cfg *config.RoomServer, roomserverDB storage.Database, producer sarama.SyncProducer, - outputRoomEventTopic string, caches caching.RoomServerCaches, fedClient *gomatrixserverlib.FederationClient, + outputRoomEventTopic string, caches caching.RoomServerCaches, keyRing gomatrixserverlib.JSONVerifier, ) *RoomserverInternalAPI { a := &RoomserverInternalAPI{ @@ -45,7 +44,6 @@ func NewRoomserverAPI( Cache: caches, ServerName: cfg.Matrix.ServerName, KeyRing: keyRing, - FedClient: fedClient, OutputRoomEventTopic: outputRoomEventTopic, // perform-er structs get initialised when we have a federation sender to use } @@ -83,7 +81,7 @@ func (r *RoomserverInternalAPI) SetFederationSenderAPI(fsAPI fsAPI.FederationSen r.Backfiller = &perform.Backfiller{ ServerName: r.ServerName, DB: r.DB, - FedClient: r.FedClient, + FSAPI: r.fsAPI, KeyRing: r.KeyRing, } } |