Refactor Filter to handle fields according to data being filtered. (#11194)

This avoids filtering against fields which cannot exist on an
event source. E.g. presence updates don't have a room.
This commit is contained in:
Patrick Cloke 2021-10-27 11:26:30 -04:00 committed by GitHub
parent 8d46fac98e
commit 19d5dc6931
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 86 additions and 68 deletions

View file

@ -438,7 +438,7 @@ class PaginationHandler:
}
state = None
if event_filter and event_filter.lazy_load_members() and len(events) > 0:
if event_filter and event_filter.lazy_load_members and len(events) > 0:
# TODO: remove redundant members
# FIXME: we also care about invite targets etc.