mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 16:44:49 -04:00
Speed up event filtering (for ACL) logic
This commit is contained in:
parent
2c963054f8
commit
4d6cb8814e
5 changed files with 105 additions and 46 deletions
|
@ -295,7 +295,11 @@ class SyncHandler(BaseHandler):
|
|||
@defer.inlineCallbacks
|
||||
def _filter_events_for_client(self, user_id, room_id, events):
|
||||
states = yield self.store.get_state_for_events(
|
||||
room_id, [e.event_id for e in events],
|
||||
room_id, frozenset(e.event_id for e in events),
|
||||
types=(
|
||||
(EventTypes.RoomHistoryVisibility, ""),
|
||||
(EventTypes.Member, user_id),
|
||||
)
|
||||
)
|
||||
|
||||
events_and_states = zip(events, states)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue