This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -526,29 +526,18 @@ async def get_messages(
526526
527527 next_token = from_token .copy_and_replace (StreamKeyType .ROOM , next_key )
528528
529- # if no events are returned from pagination, that implies
530- # we have reached the end of the available events.
531- # In that case we do not return end, to tell the client
532- # there is no need for further queries.
533- if not events :
534- return {
535- "chunk" : [],
536- "start" : await from_token .to_string (self .store ),
537- }
529+ if events :
530+ if event_filter :
531+ events = await event_filter .filter (events )
538532
539- if event_filter :
540- events = await event_filter .filter (events )
541-
542- if not use_admin_priviledge :
543- events = await filter_events_for_client (
544- self ._storage_controllers ,
545- user_id ,
546- events ,
547- is_peeking = (member_event_id is None ),
548- )
533+ if not use_admin_priviledge :
534+ events = await filter_events_for_client (
535+ self ._storage_controllers ,
536+ user_id ,
537+ events ,
538+ is_peeking = (member_event_id is None ),
539+ )
549540
550- # if after the filter applied there are no more events
551- # return immediately - but there might be more in next_token batch
552541 if not events :
553542 return {
554543 "chunk" : [],
You can’t perform that action at this time.
0 commit comments