mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 14:12:47 +00:00
Add QueryStateAndAuthChainIDs
This commit is contained in:
parent
1827dd7c09
commit
90dd5e6544
8 changed files with 175 additions and 0 deletions
|
@ -75,6 +75,12 @@ type RoomserverInternalAPI interface {
|
|||
response *QueryLatestEventsAndStateResponse,
|
||||
) error
|
||||
|
||||
QueryStateAndAuthChainIDs(
|
||||
ctx context.Context,
|
||||
request *QueryStateAndAuthChainIDsRequest,
|
||||
response *QueryStateAndAuthChainIDsResponse,
|
||||
) error
|
||||
|
||||
// Query the state after a list of events in a room from the room server.
|
||||
QueryStateAfterEvents(
|
||||
ctx context.Context,
|
||||
|
|
|
@ -250,6 +250,28 @@ type QueryStateAndAuthChainResponse struct {
|
|||
AuthChainEvents []*gomatrixserverlib.HeaderedEvent `json:"auth_chain_events"`
|
||||
}
|
||||
|
||||
// QueryStateAndAuthChainIDsRequest is a request to QueryStateAndAuthChainIDs
|
||||
type QueryStateAndAuthChainIDsRequest struct {
|
||||
// The room ID to query the state in.
|
||||
RoomID string `json:"room_id"`
|
||||
// The list of prev events for the event. Used to calculate the state at
|
||||
// the event.
|
||||
PrevEventIDs []string `json:"prev_event_ids"`
|
||||
}
|
||||
|
||||
// QueryStateAndAuthChainIDsResponse is a response to QueryStateAndAuthChainIDs
|
||||
type QueryStateAndAuthChainIDsResponse struct {
|
||||
// Does the room exist on this roomserver?
|
||||
// If the room doesn't exist this will be false and StateEvents will be empty.
|
||||
RoomExists bool `json:"room_exists"`
|
||||
// The room version of the room.
|
||||
RoomVersion gomatrixserverlib.RoomVersion `json:"room_version"`
|
||||
// The state and auth chain event IDs that were requested.
|
||||
// The lists will be in an arbitrary order.
|
||||
StateEvents []string `json:"state_event_ids"`
|
||||
AuthChainEvents []string `json:"auth_chain_event_ids"`
|
||||
}
|
||||
|
||||
// QueryRoomVersionCapabilitiesRequest asks for the default room version
|
||||
type QueryRoomVersionCapabilitiesRequest struct{}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue