1
0

Compare commits

...

2 Commits

Author SHA1 Message Date
Matthew Hodgson 507546473a changelog 2018-12-27 00:46:11 +00:00
Matthew Hodgson 6fc1966576 fix NPE in /messages by checking if all events were filtered out 2018-12-27 00:44:33 +00:00
2 changed files with 12 additions and 10 deletions
+1
View File
@@ -0,0 +1 @@
fix NPE in /messages by checking if all events were filtered out
+11 -10
View File
@@ -235,6 +235,17 @@ class PaginationHandler(object):
"room_key", next_key
)
if events:
if event_filter:
events = event_filter.filter(events)
events = yield filter_events_for_client(
self.store,
user_id,
events,
is_peeking=(member_event_id is None),
)
if not events:
defer.returnValue({
"chunk": [],
@@ -242,16 +253,6 @@ class PaginationHandler(object):
"end": next_token.to_string(),
})
if event_filter:
events = event_filter.filter(events)
events = yield filter_events_for_client(
self.store,
user_id,
events,
is_peeking=(member_event_id is None),
)
state = None
if event_filter and event_filter.lazy_load_members():
# TODO: remove redundant members