From 64206fd2a34d3dd19deb126926b8a4472ea8e9d7 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 6 Oct 2017 11:18:49 +0100 Subject: [PATCH] Add comments --- .../matrix-org/dendrite/syncapi/sync/requestpool.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/github.com/matrix-org/dendrite/syncapi/sync/requestpool.go b/src/github.com/matrix-org/dendrite/syncapi/sync/requestpool.go index 56880309f..1067c98b1 100644 --- a/src/github.com/matrix-org/dendrite/syncapi/sync/requestpool.go +++ b/src/github.com/matrix-org/dendrite/syncapi/sync/requestpool.go @@ -120,6 +120,9 @@ type stateEventInStateResp struct { // is publicly visible. Current behaviour is returning an empty array if the // user cannot see the room's history. func (rp *RequestPool) OnIncomingStateRequest(req *http.Request, roomID string) util.JSONResponse { + // TODO(#287): Auth request and handle the case where the user has left (where + // we should return the state at the poin they left) + stateEvents, err := rp.db.GetStateEventsForRoom(req.Context(), roomID) if err != nil { return httputil.LogThenError(req, err) @@ -161,6 +164,9 @@ func (rp *RequestPool) OnIncomingStateRequest(req *http.Request, roomID string) // state to see if there is an event with that type and state key, if there // is then (by default) we return the content, otherwise a 404. func (rp *RequestPool) OnIncomingStateTypeRequest(req *http.Request, roomID string, evType, stateKey string) util.JSONResponse { + // TODO(#287): Auth request and handle the case where the user has left (where + // we should return the state at the poin they left) + logger := util.GetLogger(req.Context()) logger.WithFields(log.Fields{ "roomID": roomID,