mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-01 11:13:12 -06:00
Remove now un-needed API call
This commit is contained in:
parent
cbf2b47722
commit
f7c4ec7862
|
|
@ -3,7 +3,6 @@ package syncapi
|
|||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
|
@ -24,22 +23,6 @@ type syncRoomserverAPI struct {
|
|||
rooms []*test.Room
|
||||
}
|
||||
|
||||
func (s *syncRoomserverAPI) QueryEventsByID(ctx context.Context, req *rsapi.QueryEventsByIDRequest, res *rsapi.QueryEventsByIDResponse) error {
|
||||
NextEvent:
|
||||
for _, eventID := range req.EventIDs {
|
||||
for _, r := range s.rooms {
|
||||
for _, ev := range r.Events() {
|
||||
if ev.EventID() == eventID {
|
||||
res.Events = append(res.Events, ev)
|
||||
continue NextEvent
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fmt.Println("QueryEventsByID", req.EventIDs, " returning ", len(res.Events))
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *syncRoomserverAPI) QueryLatestEventsAndState(ctx context.Context, req *rsapi.QueryLatestEventsAndStateRequest, res *rsapi.QueryLatestEventsAndStateResponse) error {
|
||||
var room *test.Room
|
||||
for _, r := range s.rooms {
|
||||
|
|
|
|||
Loading…
Reference in a new issue