Get Sytest working back to the Archive test

This commit is contained in:
Eric Eastwood 2021-01-14 02:50:11 -06:00
parent 76e1faeaf8
commit 370b3d981e
2 changed files with 8 additions and 30 deletions

View file

@ -17,6 +17,7 @@ package sync
import (
"encoding/json"
"fmt"
"math"
"net/http"
"strconv"
"time"
@ -74,10 +75,14 @@ func newSyncRequest(req *http.Request, device userapi.Device, syncDB storage.Dat
if f != nil {
filter = *f
}
limit := filter.Room.Timeline.Limit
if limit == 0 {
// TODO: Get a better to default these
// Ideally, we could merge the default base filter with the parsed one
if filter.Room.Timeline.Limit == 0 {
filter.Room.Timeline.Limit = defaultTimelineLimit
}
if filter.Room.State.Limit == 0 {
filter.Room.State.Limit = math.MaxInt32
}
// TODO: Additional query params: set_presence
logger := util.GetLogger(req.Context()).WithFields(logrus.Fields{