Merge branch 'master' into neilalexander/rsfsrefactor

This commit is contained in:
Neil Alexander 2021-12-13 15:31:16 +00:00
commit 05c5a2f2ef
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
19 changed files with 76 additions and 93 deletions

View file

@ -77,18 +77,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.Inputer = &input.Inputer{
DB: r.DB,