From 796ada7c25e39bd8c2b533f2f705f636b3df0a57 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 22 Nov 2017 16:32:43 +0000 Subject: [PATCH] Comments --- .../matrix-org/dendrite/roomserver/api/query.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/roomserver/api/query.go b/src/github.com/matrix-org/dendrite/roomserver/api/query.go index 25b45dce9..f23fd3b87 100644 --- a/src/github.com/matrix-org/dendrite/roomserver/api/query.go +++ b/src/github.com/matrix-org/dendrite/roomserver/api/query.go @@ -159,9 +159,10 @@ type QueryServerAllowedToSeeEventResponse struct { type QueryStateAndAuthChainRequest struct { // The room ID to query the state in. RoomID string `json:"room_id"` - // The list of events to return state after. + // The list of prev events for the event. Used to calculate the state at + // the event PrevEventIDs []string `json:"prev_event_ids"` - // The list of auth events to get the auth chain for. + // The list of auth events for the event. Used to calculate the auth chain AuthEventIDs []string `json:"auth_event_ids"` } @@ -225,7 +226,9 @@ type RoomserverQueryAPI interface { response *QueryServerAllowedToSeeEventResponse, ) error - // Query to get state and auth chain + // Query to get state and auth chain for a (potentially hypothetical) event. + // Takes lists of PrevEventIDs and AuthEventsIDs and uses them to calculate + // the state and auth chain to return. QueryStateAndAuthChain( ctx context.Context, request *QueryStateAndAuthChainRequest,