diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2022-04-13 13:16:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-13 13:16:02 +0200 |
commit | 29f216878994dccc68e34c90e5a0240c7698589f (patch) | |
tree | d0155a838c6c234285d952197133bc23dbbbb92e /syncapi/routing | |
parent | ea92f80c128bcff0fd4e02df40b272f7d90a97da (diff) |
Make `/messages` filterable (#2347)
* Make /messages filterable
Fix bug when determining if an event contains an URL
* Add newly passing test
* Fix test
Diffstat (limited to 'syncapi/routing')
-rw-r--r-- | syncapi/routing/messages.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/syncapi/routing/messages.go b/syncapi/routing/messages.go index 36ba3a3e..519aeff6 100644 --- a/syncapi/routing/messages.go +++ b/syncapi/routing/messages.go @@ -262,12 +262,8 @@ func (r *messagesReq) retrieveEvents() ( clientEvents []gomatrixserverlib.ClientEvent, start, end types.TopologyToken, err error, ) { - eventFilter := r.filter - // Retrieve the events from the local database. - streamEvents, err := r.db.GetEventsInTopologicalRange( - r.ctx, r.from, r.to, r.roomID, eventFilter.Limit, r.backwardOrdering, - ) + streamEvents, err := r.db.GetEventsInTopologicalRange(r.ctx, r.from, r.to, r.roomID, r.filter, r.backwardOrdering) if err != nil { err = fmt.Errorf("GetEventsInRange: %w", err) return |