mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 06:12:45 +00:00
Add query functions in the federation API
This commit is contained in:
parent
61406a6747
commit
739acc1291
4 changed files with 256 additions and 0 deletions
|
@ -60,6 +60,25 @@ type FederationInternalAPI interface {
|
|||
request *QueryJoinedHostServerNamesInRoomRequest,
|
||||
response *QueryJoinedHostServerNamesInRoomResponse,
|
||||
) error
|
||||
|
||||
QueryEventAuthFromFederation(
|
||||
ctx context.Context,
|
||||
request *QueryEventAuthFromFederationRequest,
|
||||
response *QueryEventAuthFromFederationResponse,
|
||||
) error
|
||||
|
||||
QueryStateIDsFromFederation(
|
||||
ctx context.Context,
|
||||
request *QueryStateIDsFromFederationRequest,
|
||||
response *QueryStateIDsFromFederationResponse,
|
||||
) error
|
||||
|
||||
QueryStateFromFederation(
|
||||
ctx context.Context,
|
||||
request *QueryStateFromFederationRequest,
|
||||
response *QueryStateFromFederationResponse,
|
||||
) error
|
||||
|
||||
// Handle an instruction to make_join & send_join with a remote server.
|
||||
PerformJoin(
|
||||
ctx context.Context,
|
||||
|
@ -194,6 +213,36 @@ type QueryJoinedHostServerNamesInRoomResponse struct {
|
|||
ServerNames []gomatrixserverlib.ServerName `json:"server_names"`
|
||||
}
|
||||
|
||||
type QueryEventAuthFromFederationRequest struct {
|
||||
RoomID string `json:"room_id"`
|
||||
EventID string `json:"event_id"`
|
||||
}
|
||||
|
||||
type QueryEventAuthFromFederationResponse struct {
|
||||
Events []*gomatrixserverlib.Event `json:"events"`
|
||||
}
|
||||
|
||||
type QueryStateIDsFromFederationRequest struct {
|
||||
RoomID string `json:"room_id"`
|
||||
EventID string `json:"event_id"`
|
||||
}
|
||||
|
||||
type QueryStateIDsFromFederationResponse struct {
|
||||
AuthEventIDs []string `json:"auth_event_ids"`
|
||||
StateEventIDs []string `json:"state_event_ids"`
|
||||
}
|
||||
|
||||
type QueryStateFromFederationRequest struct {
|
||||
RoomVersion gomatrixserverlib.RoomVersion `json:"room_version"`
|
||||
RoomID string `json:"room_id"`
|
||||
EventID string `json:"event_id"`
|
||||
}
|
||||
|
||||
type QueryStateFromFederationResponse struct {
|
||||
AuthEvents []*gomatrixserverlib.Event `json:"auth_events"`
|
||||
StateEvents []*gomatrixserverlib.Event `json:"state_events"`
|
||||
}
|
||||
|
||||
type PerformBroadcastEDURequest struct {
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue