mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
fix NPE in /messages by checking if all events were filtered out (#4330)
This commit is contained in:
parent
37f8bdc1d5
commit
27128145e6
1
changelog.d/4330.bugfix
Normal file
1
changelog.d/4330.bugfix
Normal file
@ -0,0 +1 @@
|
|||||||
|
fix NPE in /messages by checking if all events were filtered out
|
@ -235,6 +235,17 @@ class PaginationHandler(object):
|
|||||||
"room_key", next_key
|
"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:
|
if not events:
|
||||||
defer.returnValue({
|
defer.returnValue({
|
||||||
"chunk": [],
|
"chunk": [],
|
||||||
@ -242,16 +253,6 @@ class PaginationHandler(object):
|
|||||||
"end": next_token.to_string(),
|
"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
|
state = None
|
||||||
if event_filter and event_filter.lazy_load_members():
|
if event_filter and event_filter.lazy_load_members():
|
||||||
# TODO: remove redundant members
|
# TODO: remove redundant members
|
||||||
|
Loading…
Reference in New Issue
Block a user