mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 13:52:46 +00:00
Add QueryServerJoinedToRoom
to federation sender API
This commit is contained in:
parent
b9a575919a
commit
73c0c91bbd
9 changed files with 108 additions and 0 deletions
|
@ -25,6 +25,16 @@ func (f *FederationSenderInternalAPI) QueryJoinedHostServerNamesInRoom(
|
|||
return
|
||||
}
|
||||
|
||||
// QueryJoinedHostServerNamesInRoom implements api.FederationSenderInternalAPI
|
||||
func (f *FederationSenderInternalAPI) QueryServerJoinedToRoom(
|
||||
ctx context.Context,
|
||||
request *api.QueryServerJoinedToRoomRequest,
|
||||
response *api.QueryServerJoinedToRoomResponse,
|
||||
) (err error) {
|
||||
response.Joined, err = f.db.GetServerJoinedToRoom(ctx, request.ServerName, request.RoomID)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *FederationSenderInternalAPI) fetchServerKeysDirectly(ctx context.Context, serverName gomatrixserverlib.ServerName) (*gomatrixserverlib.ServerKeys, error) {
|
||||
ctx, cancel := context.WithTimeout(ctx, time.Second*30)
|
||||
defer cancel()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue