mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 06:12:45 +00:00
Get Sytest working back to the Archive test
This commit is contained in:
parent
76e1faeaf8
commit
370b3d981e
2 changed files with 8 additions and 30 deletions
|
@ -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{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue