mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-30 04:52:46 +00:00
Roomserver API changes (#1118)
* s/QueryBackfill/PerformBackfill/g * OutputEvent now includes AddStateEvents which contain the full event of extra state events * Only include adds not the current event * Get adding state right
This commit is contained in:
parent
25cd2dd1c9
commit
ec7718e7f8
17 changed files with 152 additions and 287 deletions
|
@ -37,7 +37,7 @@ func Backfill(
|
|||
roomID string,
|
||||
cfg *config.Dendrite,
|
||||
) util.JSONResponse {
|
||||
var res api.QueryBackfillResponse
|
||||
var res api.PerformBackfillResponse
|
||||
var eIDs []string
|
||||
var limit string
|
||||
var exists bool
|
||||
|
@ -68,7 +68,7 @@ func Backfill(
|
|||
}
|
||||
|
||||
// Populate the request.
|
||||
req := api.QueryBackfillRequest{
|
||||
req := api.PerformBackfillRequest{
|
||||
RoomID: roomID,
|
||||
// we don't know who the successors are for these events, which won't
|
||||
// be a problem because we don't use that information when servicing /backfill requests,
|
||||
|
@ -87,8 +87,8 @@ func Backfill(
|
|||
}
|
||||
|
||||
// Query the roomserver.
|
||||
if err = rsAPI.QueryBackfill(httpReq.Context(), &req, &res); err != nil {
|
||||
util.GetLogger(httpReq.Context()).WithError(err).Error("query.QueryBackfill failed")
|
||||
if err = rsAPI.PerformBackfill(httpReq.Context(), &req, &res); err != nil {
|
||||
util.GetLogger(httpReq.Context()).WithError(err).Error("query.PerformBackfill failed")
|
||||
return jsonerror.InternalServerError()
|
||||
}
|
||||
|
||||
|
|
|
@ -211,10 +211,10 @@ func (t *testRoomserverAPI) QueryStateAndAuthChain(
|
|||
}
|
||||
|
||||
// Query a given amount (or less) of events prior to a given set of events.
|
||||
func (t *testRoomserverAPI) QueryBackfill(
|
||||
func (t *testRoomserverAPI) PerformBackfill(
|
||||
ctx context.Context,
|
||||
request *api.QueryBackfillRequest,
|
||||
response *api.QueryBackfillResponse,
|
||||
request *api.PerformBackfillRequest,
|
||||
response *api.PerformBackfillResponse,
|
||||
) error {
|
||||
return fmt.Errorf("not implemented")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue