some more stuff

This commit is contained in:
Neil Alexander 2021-12-13 12:56:42 +00:00
parent 77f912721a
commit 087efc0e34
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
5 changed files with 145 additions and 2 deletions

View file

@ -2,6 +2,7 @@ package api
import (
"context"
"encoding/json"
"fmt"
"time"
@ -61,6 +62,12 @@ type FederationInternalAPI interface {
response *QueryJoinedHostServerNamesInRoomResponse,
) error
QueryEventsFromFederation(
ctx context.Context,
request *QueryEventsFromFederationRequest,
response *QueryEventsFromFederationResponse,
) error
QueryEventAuthFromFederation(
ctx context.Context,
request *QueryEventAuthFromFederationRequest,
@ -213,6 +220,15 @@ type QueryJoinedHostServerNamesInRoomResponse struct {
ServerNames []gomatrixserverlib.ServerName `json:"server_names"`
}
type QueryEventsFromFederationRequest struct {
RoomID string `json:"room_id"`
EventIDs []string `json:"event_ids"`
}
type QueryEventsFromFederationResponse struct {
Events []json.RawMessage `json:"events"`
}
type QueryEventAuthFromFederationRequest struct {
RoomID string `json:"room_id"`
EventID string `json:"event_id"`