mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 05:42: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
|
@ -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")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue