Merge branch 'master' into nats

This commit is contained in:
Neil Alexander 2021-12-16 10:49:09 +00:00
commit 8d4e5b447a
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
25 changed files with 95 additions and 117 deletions

View file

@ -78,18 +78,12 @@ func NewRoomserverAPI(
return a
}
// SetKeyring sets the keyring to a given keyring. This is only useful for the P2P
// demos and must be called after SetFederationSenderInputAPI.
func (r *RoomserverInternalAPI) SetKeyring(keyRing *gomatrixserverlib.KeyRing) {
r.KeyRing = keyRing
}
// SetFederationInputAPI passes in a federation input API reference so that we can
// avoid the chicken-and-egg problem of both the roomserver input API and the
// federation input API being interdependent.
func (r *RoomserverInternalAPI) SetFederationAPI(fsAPI fsAPI.FederationInternalAPI) {
func (r *RoomserverInternalAPI) SetFederationAPI(fsAPI fsAPI.FederationInternalAPI, keyRing *gomatrixserverlib.KeyRing) {
r.fsAPI = fsAPI
r.SetKeyring(fsAPI.KeyRing())
r.KeyRing = keyRing
r.Inviter = &perform.Inviter{
DB: r.DB,