aboutsummaryrefslogtreecommitdiff
path: root/syncapi/routing
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-06-11 19:50:40 +0100
committerGitHub <noreply@github.com>2020-06-11 19:50:40 +0100
commitec7718e7f842fa0fc5198489c904de21003db4c2 (patch)
treee267fe8dae227b274381213ef3e8a3f34fbf0f26 /syncapi/routing
parent25cd2dd1c925fa0c1eeb27a3cd71e668344102ad (diff)
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
Diffstat (limited to 'syncapi/routing')
-rw-r--r--syncapi/routing/messages.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/syncapi/routing/messages.go b/syncapi/routing/messages.go
index 8c897634..de5429db 100644
--- a/syncapi/routing/messages.go
+++ b/syncapi/routing/messages.go
@@ -375,15 +375,15 @@ func (e eventsByDepth) Less(i, j int) bool {
// Returns an error if there was an issue with retrieving the list of servers in
// the room or sending the request.
func (r *messagesReq) backfill(roomID string, backwardsExtremities map[string][]string, limit int) ([]gomatrixserverlib.HeaderedEvent, error) {
- var res api.QueryBackfillResponse
- err := r.rsAPI.QueryBackfill(context.Background(), &api.QueryBackfillRequest{
+ var res api.PerformBackfillResponse
+ err := r.rsAPI.PerformBackfill(context.Background(), &api.PerformBackfillRequest{
RoomID: roomID,
BackwardsExtremities: backwardsExtremities,
Limit: limit,
ServerName: r.cfg.Matrix.ServerName,
}, &res)
if err != nil {
- return nil, fmt.Errorf("QueryBackfill failed: %w", err)
+ return nil, fmt.Errorf("PerformBackfill failed: %w", err)
}
util.GetLogger(r.ctx).WithField("new_events", len(res.Events)).Info("Storing new events from backfill")